From a47f00eafc0daa48d6c23038ad36401c61fdcf9c Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 2 Jun 2020 16:14:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E5=92=8C=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin-function/build.gradle | 12 ++++++++---- plugin-function2/build.gradle | 10 +++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plugin-function/build.gradle b/plugin-function/build.gradle index 736dc7b..5f63ab9 100644 --- a/plugin-function/build.gradle +++ b/plugin-function/build.gradle @@ -13,12 +13,14 @@ ext { /** * 是否对插件的class进行加密保护,防止反编译 */ - guard = true + guard = false def pluginInfo = getPluginInfo() pluginPre = "fine-plugin" pluginName = pluginInfo.id pluginVersion = pluginInfo.version + + outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes" } group = 'com.fr.plugin' @@ -27,7 +29,8 @@ sourceCompatibility = '8' sourceSets { 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') task copyFiles(type: Copy,dependsOn: 'classes'){ - from "$buildDir/classes/java/main" - from "$buildDir/resources/main" +// from "$buildDir/classes/java/main" +// from "$buildDir/resources/main" + from outputPath into "$projectDir/classes" } diff --git a/plugin-function2/build.gradle b/plugin-function2/build.gradle index a92085f..5f63ab9 100644 --- a/plugin-function2/build.gradle +++ b/plugin-function2/build.gradle @@ -19,6 +19,8 @@ ext { pluginPre = "fine-plugin" pluginName = pluginInfo.id pluginVersion = pluginInfo.version + + outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes" } group = 'com.fr.plugin' @@ -27,7 +29,8 @@ sourceCompatibility = '8' sourceSets { 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') task copyFiles(type: Copy,dependsOn: 'classes'){ - from "$buildDir/classes/java/main" - from "$buildDir/resources/main" +// from "$buildDir/classes/java/main" +// from "$buildDir/resources/main" + from outputPath into "$projectDir/classes" }