Skip to content

Commit 726d9da

Browse files
authored
Merge pull request #15 from UrbanCode/PLUGINS-4700
Migrate build.gradle to gradle 9 version with Gradle warpper
2 parents 0cbab0c + a21feb6 commit 726d9da

8 files changed

Lines changed: 476 additions & 32 deletions

File tree

build.gradle

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,21 @@ repositories {
6060

6161
dependencies {
6262
// groovy-plugin-utils pulls down groovy-all as a transitive dependency for the 'compile' configuration
63-
compile 'com.ibm.urbancode.plugins:groovy-plugin-utils:+'
64-
compile 'com.ibm.urbancode.util:i18n-scraper:+'
65-
compile 'commons-codec:commons-codec:1.2'
66-
compile 'commons-httpclient:commons-httpclient:3.1'
67-
compile 'commons-logging:commons-logging:1.1.3'
63+
implementation 'com.ibm.urbancode.plugins:groovy-plugin-utils:+'
64+
implementation 'com.ibm.urbancode.util:i18n-scraper:+'
65+
implementation 'commons-codec:commons-codec:1.2'
66+
implementation 'commons-httpclient:commons-httpclient:3.1'
67+
implementation 'commons-logging:commons-logging:1.1.3'
6868
//compile 'org.codehaus.groovy:groovy-json:2.4.0'
6969

7070
// This compiles the i18n-scraper script
71-
compile localGroovy()
72-
testCompile 'junit:junit:4.11'
73-
testCompile 'org.hamcrest:hamcrest-core:1.3'
71+
implementation localGroovy()
72+
testImplementation 'junit:junit:4.11'
73+
testImplementation 'org.hamcrest:hamcrest-core:1.3'
74+
}
75+
76+
configurations {
77+
compileClasspath.extendsFrom implementation
7478
}
7579

7680
sourceSets {
@@ -101,7 +105,7 @@ compileGroovy {
101105
task copyDeps(type: Copy) {
102106
into 'lib'
103107
copy {
104-
from configurations.runtime
108+
from configurations.runtimeClasspath
105109
include { target ->
106110
return target.file.path.contains("com.ibm.urbancode")
107111
}
@@ -111,7 +115,7 @@ task copyDeps(type: Copy) {
111115
}
112116
}
113117
copy {
114-
from configurations.runtime
118+
from configurations.runtimeClasspath
115119
exclude { target ->
116120
return target.file.path.contains("com.ibm.urbancode")
117121
}
@@ -155,23 +159,31 @@ task distPlugin(type: Zip, dependsOn: ['compileGroovy', 'gatherI18n']) {
155159
exclude 'META-INF', 'i18n-scraper.groovy'
156160
}
157161
if (pluginVersion) {
158-
archiveName = "${pluginName}-v${pluginVersion}.zip"
162+
archiveFileName = "${pluginName}-v${pluginVersion}.zip"
159163
} else {
160-
archiveName = "${pluginName}-dev.zip"
164+
archiveFileName = "${pluginName}-dev.zip"
161165
}
162166
}
163167

164168
task gatherI18n(type: JavaExec) {
165169
delete buildLocaleDir
166170
mkdir buildLocaleDir
167171

168-
main = 'i18n-scraper'
172+
mainClass.set('i18n-scraper')
169173
args 'build/locale/en.properties'
170174
classpath = sourceSets.main.runtimeClasspath
171175
}
172176

173177
task cleanAll(dependsOn: ['clean', 'cleanCopyDeps', 'cleanDistPlugin', 'cleanGatherI18n'])
174178

179+
tasks.named("extractGPU") {
180+
dependsOn("copyDeps")
181+
}
182+
183+
tasks.named("copyi18n") {
184+
dependsOn("copyDeps")
185+
}
186+
175187
String stripVersion(String fileNameWithVersion) {
176188
String ext = fileNameWithVersion.substring(fileNameWithVersion.lastIndexOf("."),fileNameWithVersion.length())
177189
int end = fileNameWithVersion.lastIndexOf("-"); //assumes that: name-version.ext. Will not work with name-version-SNAPSHOT.ext

gradle/wrapper/gradle-wrapper.jar

44.4 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

gradlew

Lines changed: 251 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)