Browse Source

打包和调试冲突问题

pull/1/head
richie 5 years ago
parent
commit
a47f00eafc
  1. 12
      plugin-function/build.gradle
  2. 10
      plugin-function2/build.gradle

12
plugin-function/build.gradle

@ -13,12 +13,14 @@ ext {
/** /**
* class进行加密保护 * class进行加密保护
*/ */
guard = true guard = false
def pluginInfo = getPluginInfo() def pluginInfo = getPluginInfo()
pluginPre = "fine-plugin" pluginPre = "fine-plugin"
pluginName = pluginInfo.id pluginName = pluginInfo.id
pluginVersion = pluginInfo.version pluginVersion = pluginInfo.version
outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes"
} }
group = 'com.fr.plugin' group = 'com.fr.plugin'
@ -27,7 +29,8 @@ sourceCompatibility = '8'
sourceSets { sourceSets {
main { main {
java.outputDir = file("$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes") java.outputDir = file(outputPath)
output.resourcesDir = file(outputPath)
} }
} }
@ -42,8 +45,9 @@ ant.references["compile.classpath"] = ant.path {
classes.dependsOn('clean') classes.dependsOn('clean')
task copyFiles(type: Copy,dependsOn: 'classes'){ task copyFiles(type: Copy,dependsOn: 'classes'){
from "$buildDir/classes/java/main" // from "$buildDir/classes/java/main"
from "$buildDir/resources/main" // from "$buildDir/resources/main"
from outputPath
into "$projectDir/classes" into "$projectDir/classes"
} }

10
plugin-function2/build.gradle

@ -19,6 +19,8 @@ ext {
pluginPre = "fine-plugin" pluginPre = "fine-plugin"
pluginName = pluginInfo.id pluginName = pluginInfo.id
pluginVersion = pluginInfo.version pluginVersion = pluginInfo.version
outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes"
} }
group = 'com.fr.plugin' group = 'com.fr.plugin'
@ -27,7 +29,8 @@ sourceCompatibility = '8'
sourceSets { sourceSets {
main { main {
java.outputDir = file("$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes") java.outputDir = file(outputPath)
output.resourcesDir = file(outputPath)
} }
} }
@ -42,8 +45,9 @@ ant.references["compile.classpath"] = ant.path {
classes.dependsOn('clean') classes.dependsOn('clean')
task copyFiles(type: Copy,dependsOn: 'classes'){ task copyFiles(type: Copy,dependsOn: 'classes'){
from "$buildDir/classes/java/main" // from "$buildDir/classes/java/main"
from "$buildDir/resources/main" // from "$buildDir/resources/main"
from outputPath
into "$projectDir/classes" into "$projectDir/classes"
} }

Loading…
Cancel
Save