混淆配置,所有的包增加classifier为xj,只对biz包混淆,混淆后classifier为obf,profile配置写好,混淆打包时勾选biz-obf+default打包,不混淆时只勾选default
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-consultation-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-local-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
@@ -79,8 +81,25 @@
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-watch-api</artifactId>
|
||||
<classifier>xj</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>biz-obf</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.wvengen</groupId>
|
||||
<artifactId>proguard-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions
|
||||
-keep @org.springframework.stereotype.Service class *
|
||||
-keep @org.springframework.web.bind.annotation.RestController class *
|
||||
-keep @org.springframework.context.annotation.Configuration class *
|
||||
-keep @org.springframework.stereotype.Component class *
|
||||
-keepclassmembers enum * { # 保留枚举结构
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * implements java.io.Serializable { *; }
|
||||
-keepclassmembers class * {
|
||||
@org.springframework.web.bind.annotation.*Mapping *;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
|
||||
}
|
||||
-keep class lombok.** { *; }
|
||||
-keepclassmembers class * {
|
||||
@lombok.Getter *;
|
||||
@lombok.Setter *;
|
||||
}
|
||||
# MyBatis 专用保留规则
|
||||
-keep interface org.jeecg.**.mapper.** { *; }
|
||||
-keepclassmembers class org.jeecg.**.entity.** { *; }
|
||||
-dontwarn org.jeecg.**.entity.**
|
||||
|
||||
# 关闭优化和压缩(避免框架兼容性问题)
|
||||
-dontshrink # 不删除未使用代码
|
||||
-dontoptimize # 不优化字节码[5,6](@ref)
|
||||
-keepdirectories
|
||||
-dontusemixedcaseclassnames
|
||||
-adaptclassstrings
|
||||
# 混淆选项
|
||||
-useuniqueclassmembernames # 成员名称唯一化
|
||||
-ignorewarnings
|
||||
@@ -11,6 +11,10 @@
|
||||
<artifactId>jeecg-system-start</artifactId>
|
||||
<description>System项目微服务启动</description>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>false</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- 引入jeecg-boot-starter-cloud依赖 -->
|
||||
<dependency>
|
||||
@@ -21,6 +25,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-biz</artifactId>
|
||||
<classifier>${biz-classifier}</classifier>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
<artifactId>jeecg-system</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>jeecg-system-api</module>
|
||||
<module>jeecg-system-biz</module>
|
||||
|
||||
Reference in New Issue
Block a user