1+ import java.util.Properties
2+
13plugins {
24 alias(libs.plugins.android.application)
3- alias(libs.plugins.kotlin.android)
45 alias(libs.plugins.kotlin.compose)
56 alias(libs.plugins.aboutLibraries)
7+ // alias(libs.plugins.hilt)
68 id(" kotlin-parcelize" )
79}
810
11+ val props = Properties ().apply {
12+ load(rootProject.file(" local.properties" ).inputStream())
13+ }
14+
915android {
16+ signingConfigs {
17+ create(" release" ) {
18+ storeFile = file(props[" RELEASE_STORE_FILE" ] as String )
19+ storePassword = props[" RELEASE_STORE_PASSWORD" ] as String
20+ keyAlias = props[" RELEASE_KEY_ALIAS" ] as String
21+ keyPassword = props[" RELEASE_KEY_PASSWORD" ] as String
22+ }
23+ }
1024 namespace = " me.kavishdevar.librepods"
11- compileSdk = 36
25+ compileSdk = 37
1226
1327 defaultConfig {
1428 applicationId = " me.kavishdevar.librepods"
1529 minSdk = 33
16- targetSdk = 36
17- versionCode = 9
30+ targetSdk = 37
31+ versionCode = 28
1832 versionName = " 0.2.0"
1933 }
20-
2134 buildTypes {
2235 release {
23- isMinifyEnabled = false
36+ isMinifyEnabled = true
37+ isShrinkResources = true
2438 proguardFiles(
2539 getDefaultProguardFile(" proguard-android-optimize.txt" ),
2640 " proguard-rules.pro"
2741 )
42+ externalNativeBuild {
43+ cmake {
44+ arguments + = " -DCMAKE_BUILD_TYPE=Release"
45+ }
46+ }
47+ buildConfigField(" Boolean" , " PLAY_BUILD" , " false" )
48+ signingConfig = signingConfigs.getByName(" release" )
49+ }
50+ debug {
51+ buildConfigField(" Boolean" , " PLAY_BUILD" , " false" )
52+ signingConfig = signingConfigs.getByName(" release" )
53+ }
54+ create(" playRelease" ) {
55+ initWith(getByName(" release" ))
56+ buildConfigField(" Boolean" , " PLAY_BUILD" , " true" )
57+ }
58+ create(" playDebug" ) {
59+ initWith(getByName(" debug" ))
60+ buildConfigField(" Boolean" , " PLAY_BUILD" , " true" )
2861 }
2962 }
3063 compileOptions {
31- sourceCompatibility = JavaVersion .VERSION_1_8
32- targetCompatibility = JavaVersion .VERSION_1_8
33- }
34- kotlinOptions {
35- jvmTarget = " 1.8"
64+ sourceCompatibility = JavaVersion .VERSION_21
65+ targetCompatibility = JavaVersion .VERSION_21
3666 }
3767 buildFeatures {
3868 compose = true
3969 viewBinding = true
70+ buildConfig = true
4071 }
4172 androidResources {
4273 generateLocaleConfig = true
@@ -49,18 +80,41 @@ android {
4980 }
5081 sourceSets {
5182 getByName(" main" ) {
52- res.srcDirs(" src/main/res" , " src/main/res-apple" )
83+ res.directories+ = " src/main/res-apple"
84+ }
85+ }
86+
87+ ndkVersion = " 30.0.14904198"
88+
89+ flavorDimensions + = " env"
90+
91+ productFlavors {
92+ create(" normal" ) {
93+ dimension = " env"
94+ externalNativeBuild {
95+ cmake {
96+ arguments + = " -DIS_XPOSED=OFF"
97+ }
98+ }
99+ }
100+ create(" xposed" ) {
101+ dimension = " env"
102+ externalNativeBuild {
103+ cmake {
104+ arguments + = " -DIS_XPOSED=ON"
105+ }
106+ }
107+ versionNameSuffix = " -xposed"
53108 }
54109 }
55110}
56111
57112dependencies {
113+ implementation(platform(libs.androidx.compose.bom))
58114 implementation(libs.accompanist.permissions)
59- implementation(libs.hiddenapibypass)
60115 implementation(libs.androidx.core.ktx)
61116 implementation(libs.androidx.lifecycle.runtime.ktx)
62117 implementation(libs.androidx.activity.compose)
63- implementation(platform(libs.androidx.compose.bom))
64118 implementation(libs.androidx.ui)
65119 implementation(libs.androidx.ui.graphics)
66120 implementation(libs.androidx.ui.tooling.preview)
@@ -72,15 +126,18 @@ dependencies {
72126 implementation(libs.haze.materials)
73127 implementation(libs.androidx.dynamicanimation)
74128 implementation(libs.androidx.compose.ui)
129+ implementation(libs.androidx.compose.material.icons.core)
130+ implementation(libs.billing)
75131 debugImplementation(libs.androidx.compose.ui.tooling)
76132 implementation(libs.androidx.compose.foundation.layout)
77133 implementation(libs.aboutlibraries)
78134 implementation(libs.aboutlibraries.compose.m3)
79- // compileOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar"))))
80- // implementation(fileTree(mapOf("dir" to "lib", "include" to listOf("*.aar"))))
81- compileOnly(files(" libs/libxposed-api-100.aar" ))
82- debugImplementation(files(" libs/backdrop-debug.aar" ))
83- releaseImplementation(files(" libs/backdrop-release.aar" ))
135+ implementation(libs.backdrop)
136+ // implementation(libs.hilt)
137+ // implementation(libs.hilt.compiler)
138+ add(" xposedCompileOnly" , libs.libxposed.api)
139+ add(" xposedImplementation" , libs.libxposed.service)
140+ add(" playReleaseImplementation" , libs.billing)
84141}
85142
86143aboutLibraries {
0 commit comments