-
Notifications
You must be signed in to change notification settings - Fork 56
/
build.gradle
119 lines (98 loc) · 3.45 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// This gradle build depends on Mendix internal resources, the lastest commit
// which did not is 6e1527a5e31347c6914bc34deab31ef4ab46953b. You may restore
// the gradle scripts to that commit if you which to use them at your own risk.
// We don't guarantee that those will keep working in the future.
plugins {
id 'java'
id 'com.mendix.gradle.publish-module-plugin' version '1.14'
id 'net.researchgate.release' version '2.8.1'
}
sourceCompatibility = '11'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
project.ext {
mendixPublicApiVersion = '9.18.0'
}
mxMarketplace {
appNumber = 170
appName = 'Community Commons'
moduleName = 'CommunityCommons'
moduleLicense = 'Apache V2'
appDirectory = "src/CommunityCommons"
versionPathPrefix = "_Version " // the path prefix within the module to the version folder
createMigrationFile = true
}
def userLibDir = "$projectDir/src/CommunityCommons/userlib"
repositories {
maven {
url 'https://nexus.rnd.mendix.com/repository/repo1-proxy/'
}
maven {
url 'https://nexus.rnd.mendix.com/repository/maven-hosted/'
}
}
configurations {
implementation {
canBeResolved = true
}
}
dependencies {
testImplementation(
[group: 'com.mendix', name: 'public-api', version: "$mendixPublicApiVersion"],
[group: 'junit', name: 'junit', version: '4.13.1'],
[group: 'org.apache.httpcomponents.core5', name: 'httpcore5', version: '5.0.3'],
[group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.0.3'],
[group: 'org.hamcrest', name: 'hamcrest', version: '2.2']
)
compileOnly([group: 'com.mendix', name: 'public-api', version: "$mendixPublicApiVersion"])
implementation(
[group: 'com.google.guava', name: 'guava', version: '32.0.1-jre'],
[group: 'com.googlecode.owasp-java-html-sanitizer', name: 'owasp-java-html-sanitizer', version: '20211018.2'],
[group: 'commons-io', name: 'commons-io', version: '2.17.0'],
[group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.30'],
[group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'],
[group: 'org.apache.commons', name: 'commons-text', version: '1.10.0']
)
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
sourceSets {
main {
java {
srcDir 'src/CommunityCommons/javasource'
exclude 'unittesting/**'
exclude 'system/UserActionsRegistrar.java'
}
}
test {
java {
srcDirs = ["src/test", "src/CommunityCommons/javasource"]
}
}
}
test {
exclude 'unittesting/*'
}
task copyAllToUserlib(type: Copy) {
from configurations.testCompileClasspath
into userLibDir
eachFile { fileCopyDetails -> new File(destinationDir, "${fileCopyDetails.name}.${project.name}.RequiredLib").write '' }
}
tasks.named('mxBuild') {
dependsOn copyAllToUserlib
}
tasks.named('compileJava') {
dependsOn mxBuild
}
clean {
delete "$userLibDir"
}
release {
tagTemplate = '$name-$version'
}
task afterReleaseBuildTask {
dependsOn 'clean'
dependsOn 'publishModuleToMarketplace'
tasks.findByName('publishModuleToMarketplace').mustRunAfter 'clean'
}
afterReleaseBuild.dependsOn afterReleaseBuildTask