@@ -48,29 +48,29 @@ task generatePom(type: GenerateMavenPom, dependsOn: [":provider:publishToMavenLo
48
48
}
49
49
}
50
50
51
- // if (System.env.CI != 'true') {
52
- // task pluginDescriptor(type: Exec, dependsOn: generatePom) {
53
- // if (isWindows()) {
54
- // try {
55
- // // check if mvn.bat exists
56
- // def proc = new ProcessBuilder('mvn.bat', '-v')
57
- // proc.start().waitFor()
58
- //
59
- // commandLine 'mvn.bat', '-f', "${buildDir}/poms/pom.xml", '-e', '-B', 'org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor'
60
- // } catch(Exception e) {
61
- // commandLine 'mvn.cmd', '-f', "${buildDir}/poms/pom.xml", '-e', '-B', 'org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor'
62
- // }
63
- // } else {
64
- // commandLine 'sh', '-c', "mvn -f ${buildDir}/poms/pom.xml -e -B org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor"
65
- // }
66
- //
67
- // doLast {
68
- // final dir = project.compileKotlin.destinationDirectory.dir('META-INF/maven').get()
69
- // final pluginDescriptor = dir.file('plugin.xml').getAsFile()
70
- // assert pluginDescriptor.exists(), "[$pluginDescriptor.canonicalPath] was not created"
71
- // }
72
- // }
73
- //
74
- // pluginDescriptor.shouldRunAfter project.jar
75
- // project.jar.dependsOn pluginDescriptor
76
- // }
51
+ if (System . env. CI != ' true' ) {
52
+ task pluginDescriptor(type : Exec , dependsOn : generatePom) {
53
+ if (isWindows()) {
54
+ try {
55
+ // check if mvn.bat exists
56
+ def proc = new ProcessBuilder (' mvn.bat' , ' -v' )
57
+ proc. start(). waitFor()
58
+
59
+ commandLine ' mvn.bat' , ' -f' , " ${ buildDir} /poms/pom.xml" , ' -e' , ' -B' , ' org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor'
60
+ } catch (Exception e) {
61
+ commandLine ' mvn.cmd' , ' -f' , " ${ buildDir} /poms/pom.xml" , ' -e' , ' -B' , ' org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor'
62
+ }
63
+ } else {
64
+ commandLine ' sh' , ' -c' , " mvn -f ${ buildDir} /poms/pom.xml -e -B org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor"
65
+ }
66
+
67
+ doLast {
68
+ final dir = project. compileKotlin. destinationDirectory. dir(' META-INF/maven' ). get()
69
+ final pluginDescriptor = dir. file(' plugin.xml' ). getAsFile()
70
+ assert pluginDescriptor. exists(), " [$pluginDescriptor . canonicalPath ] was not created"
71
+ }
72
+ }
73
+
74
+ pluginDescriptor. shouldRunAfter project. jar
75
+ project. jar. dependsOn pluginDescriptor
76
+ }
0 commit comments