apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "cn.feng.skin.demo"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':android-skin-loader-lib')
}
final def TARGET_SKIN_DIR = '../skin-package/'
final def SAMPLE_NAME = 'Sample.apk'
assembleRelease.doLast {
println("=====================assembleRelease.doLast.begin.=========================")
def dir = new File(TARGET_SKIN_DIR)
if (!dir.exists()) {
dir.mkdirs()
}
def f = new File(TARGET_SKIN_DIR + SAMPLE_NAME)
if (f.exists()) {
f.delete()
}
copy {
from('build/outputs/apk')
into(TARGET_SKIN_DIR)
include '*.apk'
exclude '**/*-unaligned.apk'
rename ('android-skin-loader-sample-release.apk', SAMPLE_NAME)
}
println("=====================assembleRelease.doLast success.=========================")
}
assembleDebug.doLast {
println("=====================assembleDebug.doLast.begin.=========================")
def dir = new File(TARGET_SKIN_DIR)
if (!dir.exists()) {
dir.mkdirs()
}
def f = new File(TARGET_SKIN_DIR + SAMPLE_NAME)
if (f.exists()) {
f.delete()
}
copy {
from('build/outputs/apk')
into(TARGET_SKIN_DIR)
include '*.apk'
exclude '**/*-unaligned.apk'
rename ('android-skin-loader-sample-debug.apk', SAMPLE_NAME)
}
println("=====================assembleDebug.doLast success.=========================")
}
Error:(32, 0) Could not get unknown property 'assembleRelease' for project ':android-skin-loader-sample' of type org.gradle.api.Project.