@@ -60,17 +60,21 @@ repositories {
6060
6161dependencies {
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
7680sourceSets {
@@ -101,7 +105,7 @@ compileGroovy {
101105task 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
164168task 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
173177task 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+
175187String 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
0 commit comments