85 lines
2.4 KiB
Groovy
85 lines
2.4 KiB
Groovy
plugins {
|
||
id 'com.android.application'
|
||
}
|
||
|
||
android {
|
||
namespace 'com.aliyun.ams.httpdns.demo'
|
||
compileSdkVersion 34
|
||
buildToolsVersion "30.0.2"
|
||
defaultConfig {
|
||
applicationId "com.aliyun.ams.httpdns.demo2"
|
||
minSdkVersion 19
|
||
targetSdkVersion 34
|
||
versionCode 1
|
||
versionName "1.0"
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||
}
|
||
|
||
|
||
buildTypes {
|
||
debug {
|
||
minifyEnabled false
|
||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
}
|
||
release {
|
||
minifyEnabled true
|
||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
}
|
||
forTest {
|
||
// 娉ㄦ剰杩欓噷鐨勯厤缃紝骞朵笉鏄渶瑕佺紪璇慺orTest鐨刟pp锛岃€屾槸閬垮厤httpdns-sdk鍦ˋndroidStudio鏀逛负end2end杩愯娴嬭瘯鏃?BuildVariants鎶ラ敊
|
||
initWith release
|
||
debuggable true
|
||
}
|
||
}
|
||
|
||
variantFilter { variant ->
|
||
def names = variant.flavors*.name
|
||
def type = variant.buildType.name
|
||
// To check for a certain build type, use variant.buildType.name == "<buildType>"
|
||
if ((names.contains("normal") && type.contains("forTest"))
|
||
|| (names.contains("intl") && type.contains("forTest"))
|
||
|| (names.contains("end2end") && type.contains("release"))
|
||
|| (names.contains("end2end") && type.contains("debug"))
|
||
) {
|
||
// Gradle ignores any variants that satisfy the conditions above.
|
||
setIgnore(true)
|
||
}
|
||
}
|
||
|
||
testOptions {
|
||
unitTests {
|
||
all {
|
||
jvmArgs '-noverify'
|
||
systemProperty 'robolectric.logging.enable', true
|
||
}
|
||
}
|
||
}
|
||
|
||
flavorDimensions "version"
|
||
|
||
productFlavors {
|
||
normal {
|
||
|
||
}
|
||
|
||
intl {
|
||
|
||
}
|
||
|
||
end2end {
|
||
// 娉ㄦ剰杩欓噷鐨勯厤缃紝骞朵笉鏄渶瑕佺紪璇慹nd2end鐨刟pp锛岃€屾槸閬垮厤httpdns-sdk鍦ˋndroidStudio鏀逛负end2end杩愯娴嬭瘯鏃?BuildVariants鎶ラ敊
|
||
}
|
||
}
|
||
}
|
||
|
||
configurations.all {
|
||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||
}
|
||
|
||
dependencies {
|
||
|
||
implementation project(':httpdns-sdk')
|
||
|
||
implementation("com.squareup.okhttp3:okhttp:3.9.0")
|
||
}
|