|
|
@ -27,12 +27,10 @@ group = 'com.fr.plugin' |
|
|
|
version = '10.0' |
|
|
|
version = '10.0' |
|
|
|
sourceCompatibility = '8' |
|
|
|
sourceCompatibility = '8' |
|
|
|
|
|
|
|
|
|
|
|
if (!guard) { |
|
|
|
sourceSets { |
|
|
|
sourceSets { |
|
|
|
main { |
|
|
|
main { |
|
|
|
java.outputDir = file(outputPath) |
|
|
|
java.outputDir = file(outputPath) |
|
|
|
output.resourcesDir = file(outputPath) |
|
|
|
output.resourcesDir = file(outputPath) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -47,31 +45,28 @@ ant.references["compile.classpath"] = ant.path { |
|
|
|
classes.dependsOn('clean') |
|
|
|
classes.dependsOn('clean') |
|
|
|
|
|
|
|
|
|
|
|
task copyFiles(type: Copy,dependsOn: 'classes'){ |
|
|
|
task copyFiles(type: Copy,dependsOn: 'classes'){ |
|
|
|
if (guard) { |
|
|
|
from outputPath |
|
|
|
from "$buildDir/classes/java/main" |
|
|
|
|
|
|
|
from "$buildDir/resources/main" |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
from outputPath |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
into "$projectDir/classes" |
|
|
|
into "$projectDir/classes" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
task preJar(type:Copy,dependsOn: guard ? 'compile_encrypt_javas' : 'compile_plain_javas'){ |
|
|
|
task preJar(type:Copy,dependsOn: guard ? 'compile_encrypt_javas' : 'compile_plain_javas'){ |
|
|
|
from "$projectDir/classes" |
|
|
|
from "$projectDir/classes" |
|
|
|
into "$buildDir/classes/java/main" |
|
|
|
into "$projectDir/transform-classes" |
|
|
|
include "**/*.*" |
|
|
|
include "**/*.*" |
|
|
|
doLast(){ |
|
|
|
|
|
|
|
delete file("$projectDir/classes") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
jar.dependsOn("preJar") |
|
|
|
jar.dependsOn("preJar") |
|
|
|
|
|
|
|
|
|
|
|
task makeJar(type: Jar,dependsOn: preJar){ |
|
|
|
task makeJar(type: Jar,dependsOn: preJar){ |
|
|
|
from fileTree(dir:guard ? "$buildDir/classes/java/main" : outputPath) |
|
|
|
from fileTree(dir: "$projectDir/transform-classes") |
|
|
|
baseName pluginPre |
|
|
|
baseName pluginPre |
|
|
|
appendix pluginName |
|
|
|
appendix pluginName |
|
|
|
version pluginVersion |
|
|
|
version pluginVersion |
|
|
|
destinationDir = file("$buildDir/libs") |
|
|
|
destinationDir = file("$buildDir/libs") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doLast(){ |
|
|
|
|
|
|
|
delete file("$projectDir/classes") |
|
|
|
|
|
|
|
delete file("$projectDir/transform-classes") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
task copyFile(type: Copy,dependsOn: ["makeJar"]){ |
|
|
|
task copyFile(type: Copy,dependsOn: ["makeJar"]){ |
|
|
@ -84,7 +79,7 @@ task copyFile(type: Copy,dependsOn: ["makeJar"]){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
task zip(type:Zip,dependsOn:["copyFile"]){ |
|
|
|
task zip(type:Zip,dependsOn:["copyFile"]){ |
|
|
|
from "$buildDir/temp" |
|
|
|
from "$buildDir/temp/plugin" |
|
|
|
destinationDir file("$buildDir/install") |
|
|
|
destinationDir file("$buildDir/install") |
|
|
|
baseName pluginPre |
|
|
|
baseName pluginPre |
|
|
|
appendix pluginName |
|
|
|
appendix pluginName |
|
|
|