open source
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import proguard.gradle.ProGuardTask
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "28.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 17
|
||||
versionName "release-2.9.0"
|
||||
}
|
||||
sourceSets.main{
|
||||
jniLibs.srcDir 'libs'
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.android.support:appcompat-v7:25.3.1'
|
||||
}
|
||||
android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def SDK_BASENAME = "conch5";
|
||||
def SDK_VERSION = "_1.0";
|
||||
def sdkDestinationPath = "outJar";
|
||||
def zipFile = file('build/intermediates/packaged-classes/release/classes.jar');
|
||||
|
||||
def fromJar=sdkDestinationPath +"/"+ SDK_BASENAME + SDK_VERSION + ".jar";
|
||||
def toJar=sdkDestinationPath +"/"+ SDK_BASENAME + SDK_VERSION + "_min.jar";
|
||||
task deleteBuild(type: Delete) {
|
||||
delete fromJar
|
||||
}
|
||||
|
||||
|
||||
task conchUglify(type: ProGuardTask, dependsOn: "build") {
|
||||
// 未混淆的jar
|
||||
injars fromJar
|
||||
// 混淆后的jar路径
|
||||
outjars toJar
|
||||
// 具体需要keep住的类
|
||||
configuration 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
|
||||
task conchMakeJar(type: Jar) {
|
||||
from zipTree(zipFile)
|
||||
//from fileTree(dir:'build/intermediates/classes/release',includes:['laya/**'])
|
||||
from fileTree(dir: 'src/main',includes: ['assets/**'])
|
||||
baseName = SDK_BASENAME + SDK_VERSION
|
||||
destinationDir = file(sdkDestinationPath)
|
||||
}
|
||||
|
||||
|
||||
conchMakeJar.dependsOn(deleteBuild, build)
|
||||
Reference in New Issue
Block a user