forked from UNIVALI-LITE/Portugol-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
81 lines (61 loc) · 1.94 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.codehaus.groovy:groovy-all:2.4.12'
}
}
plugins {
id 'de.undercouch.download' version '3.4.3'
}
import org.gradle.api.artifacts.*
ext {
versionInfo = new Properties()
versionInfo.load(new FileInputStream(rootProject.projectDir.getPath() + '/ide/src/main/resources/version.properties'))
}
//String versionString = versionInfo.majorVersion + '.' + versionInfo.minorVersion + '.' + versionInfo.buildVersion + '.' + versionInfo.revisionVersion
String versionString = versionInfo.majorVersion + '.' + versionInfo.minorVersion + '.' + versionInfo.buildVersion
if (versionInfo.releaseName != null && !versionInfo.releaseName.trim().isEmpty()) {
versionString = versionString + '-' + versionInfo.releaseName.trim()
}
group = versionInfo.mavenGroupId
version = versionString
apply plugin: 'base'
subprojects {
apply from: rootProject.file('projects.gradle')
}
task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') {
title = 'All modules'
destinationDir = new File(project.buildDir, 'merged-javadoc')
// Note: The closures below are executed lazily.
source {
subprojects*.sourceSets*.main*.allSource
}
classpath.from {
subprojects*.configurations*.compile*.copyRecursive({ !(it instanceof ProjectDependency); })*.resolve()
}
}
task cleanAll(){
subprojects.each {
it.afterEvaluate {
def cleanTask = it.tasks.findByName('clean')
if (cleanTask) {
dependsOn(cleanTask)
}
}
}
}
task buildAll(){
subprojects.each {
it.afterEvaluate {
def buildTask = it.tasks.findByName('build')
if (buildTask) {
dependsOn(buildTask)
}
}
}
}
apply from: rootProject.file('dist.gradle')
clean.dependsOn cleanAll
build.dependsOn buildAll