-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
133 lines (120 loc) · 4.94 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'com.google.devtools.ksp'
}
apply from: secret
android {
compileSdk 34
defaultConfig {
applicationId "com.skyd.nightscreen"
minSdk 24
targetSdk 34
versionCode 13
versionName "1.9-beta02"
flavorDimensions = ["versionName"]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
signingConfigs {
release {
keyAlias secret.sign.RELEASE_KEY_ALIAS
keyPassword secret.sign.RELEASE_KEY_PASSWORD
storeFile file('../key.jks')
storePassword secret.sign.RELEASE_STORE_PASSWORD
}
}
productFlavors {
GitHub
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "app_release_${variant.productFlavors[0].name.toLowerCase()}_${variant.versionName}.apk"
}
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false // 使用keep.xml,keep住某些资源文件
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
applicationIdSuffix '.debug' // 一台手机debug release共存
ndk {
abiFilters 'armeabi', 'x86', 'x86_64', 'arm64-v8a'
}
}
release {
signingConfig signingConfigs.release //签名
minifyEnabled true
shrinkResources true // 使用keep.xml,keep住某些资源文件
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
ndk {
abiFilters 'armeabi', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
buildFeatures {
viewBinding true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.4'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
excludes += 'DebugProbesKt.bin'
excludes += 'kotlin-tooling-metadata.json'
excludes += 'okhttp3/internal/publicsuffix/NOTICE'
}
}
namespace 'com.skyd.nightscreen'
}
tasks.withType(KotlinCompile).configureEach {
//noinspection GrDeprecatedAPIUsage
kotlinOptions {
freeCompilerArgs += "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
freeCompilerArgs += "-opt-in=androidx.compose.animation.ExperimentalAnimationApi"
freeCompilerArgs += "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi"
freeCompilerArgs += "-opt-in=coil.annotation.ExperimentalCoilApi"
freeCompilerArgs += "-opt-in=androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi"
freeCompilerArgs += "-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi"
freeCompilerArgs += "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi"
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material3:material3:$md3_version"
implementation "androidx.compose.material3:material3-window-size-class:$md3_version"
implementation "androidx.compose.material:material-icons-extended:1.5.4"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.lifecycle:lifecycle-runtime-compose:2.6.2"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'androidx.activity:activity-compose:1.8.0'
implementation "com.google.android.material:material:1.10.0"
implementation "com.github.getActivity:XXPermissions:18.3"
implementation "com.google.dagger:hilt-android:2.48.1"
kapt "com.google.dagger:hilt-android-compiler:2.48.1"
implementation "androidx.hilt:hilt-navigation-compose:1.1.0"
implementation "androidx.navigation:navigation-compose:2.7.5"
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version"
implementation "io.coil-kt:coil-compose:2.5.0"
implementation "androidx.profileinstaller:profileinstaller:1.3.1"
implementation "com.godaddy.android.colorpicker:compose-color-picker:0.7.0"
implementation "com.godaddy.android.colorpicker:compose-color-picker-android:0.7.0"
implementation "androidx.core:core-splashscreen:1.0.1"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
}