1+ plugins {
2+ id(" com.android.application" )
3+ id(" kotlin-android" )
4+ id(" android-junk-code" )
5+ id(" kotlin-kapt" )
6+ id(" com.getkeepsafe.dexcount" )
7+ }
8+
9+ android {
10+ compileSdkVersion(31 )
11+
12+ defaultConfig {
13+ applicationId = " cn.hx.plugin.junkcode.demo"
14+ minSdkVersion(16 )
15+ targetSdkVersion(31 )
16+ versionCode(1 )
17+ versionName(" 1.0" )
18+ multiDexEnabled = true
19+ testInstrumentationRunner(" androidx.test.runner.AndroidJUnitRunner" )
20+ }
21+ buildFeatures {
22+ dataBinding = true
23+ viewBinding = true
24+ }
25+ buildTypes {
26+ val release by getting {
27+ isMinifyEnabled = true
28+ proguardFiles(
29+ getDefaultProguardFile(" proguard-android-optimize.txt" ),
30+ " proguard-rules.pro"
31+ )
32+ }
33+ }
34+ lintOptions {
35+ isCheckReleaseBuilds = false
36+ isAbortOnError = false
37+ }
38+ }
39+
40+ androidJunkCode {
41+ variantConfig {
42+ create(" debug" ) {
43+ packageBase = " cn.hx.plugin.ui"
44+ packageCount = 30
45+ activityCountPerPackage = 3
46+ excludeActivityJavaFile = false
47+ otherCountPerPackage = 50
48+ methodCountPerClass = 20
49+ resPrefix = " junk_"
50+ drawableCount = 300
51+ stringCount = 300
52+ }
53+ create(" release" ) {
54+ packageBase = " cn.hx.plugin.ui"
55+ packageCount = 30
56+ activityCountPerPackage = 3
57+ excludeActivityJavaFile = false
58+ otherCountPerPackage = 50
59+ methodCountPerClass = 20
60+ resPrefix = " junk_"
61+ drawableCount = 300
62+ stringCount = 300
63+ }
64+ }
65+ }
66+
67+ dependencies {
68+ implementation(fileTree(mapOf (" dir" to " libs" , " include" to listOf (" *.jar" ))))
69+ implementation(" org.jetbrains.kotlin:kotlin-stdlib:1.5.31" )
70+ implementation(" androidx.multidex:multidex:2.0.1" )
71+ implementation(" androidx.core:core-ktx:1.7.0" )
72+ implementation(" androidx.appcompat:appcompat:1.4.1" )
73+ implementation(" androidx.constraintlayout:constraintlayout:2.1.3" )
74+ testImplementation(" junit:junit:4.13.2" )
75+ androidTestImplementation(" androidx.test.ext:junit:1.1.3" )
76+ androidTestImplementation(" androidx.test.espresso:espresso-core:3.4.0" )
77+ }
0 commit comments