From 1ba498b7df2859161b24e757b7724e45da8595ac Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 2 Jun 2020 12:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin-function/build.gradle | 15 +++++++++------ plugin-function2/build.gradle | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/plugin-function/build.gradle b/plugin-function/build.gradle index d7f752f..0b5658d 100644 --- a/plugin-function/build.gradle +++ b/plugin-function/build.gradle @@ -1,9 +1,6 @@ -import org.codehaus.groovy.runtime.GStringImpl -plugins { - id 'java' - id 'maven-publish' -} +apply plugin: 'java' + ext { /** @@ -11,7 +8,7 @@ ext { * 1.如果依赖的jar需要打包到zip中,放置在lib根目录下 * 2.如果依赖的jar仅仅是编译时需要,防止在lib下子目录下即可 */ - libPath = "$projectDir/../webroot/WEB-INF/lib" as GStringImpl + libPath = "$projectDir/../webroot/WEB-INF/lib" /** * 是否对插件的class进行加密保护,防止反编译 @@ -28,6 +25,12 @@ group = 'com.fr.plugin' version = '10.0' sourceCompatibility = '8' +sourceSets { + main { + java.outputDir = file("$projectDir/../webroot/WEB-INF/lib/plugins/plugin-" + pluginName + "-1.0/classes") + } +} + ant.importBuild("encrypt.xml") //定义ant变量 ant.projectDir = projectDir diff --git a/plugin-function2/build.gradle b/plugin-function2/build.gradle index fa5238b..c4aca42 100644 --- a/plugin-function2/build.gradle +++ b/plugin-function2/build.gradle @@ -1,9 +1,6 @@ -import org.codehaus.groovy.runtime.GStringImpl -plugins { - id 'java' - id 'maven-publish' -} +apply plugin: 'java' + ext { /** @@ -11,7 +8,7 @@ ext { * 1.如果依赖的jar需要打包到zip中,放置在lib根目录下 * 2.如果依赖的jar仅仅是编译时需要,防止在lib下子目录下即可 */ - libPath = "$projectDir/../webroot/WEB-INF/lib" as GStringImpl + libPath = "$projectDir/../webroot/WEB-INF/lib" /** * 是否对插件的class进行加密保护,防止反编译 @@ -28,6 +25,12 @@ group = 'com.fr.plugin' version = '10.0' sourceCompatibility = '8' +sourceSets { + main { + java.outputDir = file("$projectDir/../webroot/WEB-INF/lib/plugins/plugin-" + pluginName + "-1.0/classes") + } +} + ant.importBuild("encrypt.xml") //定义ant变量 ant.projectDir = projectDir