-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
65 lines (64 loc) 路 3.53 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
65 lines (64 loc) 路 3.53 KB
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
import java.util.Properties
plugins { id("com.android.application"); id("org.jetbrains.kotlin.plugin.compose") }
val version = Properties().apply { rootProject.file("version.properties").inputStream().use { load(it) } }
val releaseStore = System.getenv("ANDROID_KEYSTORE_PATH")
android {
namespace = "io.archivebox.app"
compileSdk = 37
defaultConfig {
applicationId = "io.archivebox.app"
minSdk = 28
targetSdk = 37
versionCode = (providers.gradleProperty("versionCode").orNull ?: System.getenv("VERSION_CODE") ?: version.getProperty("versionCode")).toInt()
versionName = providers.gradleProperty("versionName").orNull ?: System.getenv("VERSION_NAME") ?: version.getProperty("versionName")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
if (releaseStore != null) {
signingConfigs.create("release") {
storeFile = file(releaseStore)
storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD")
keyAlias = System.getenv("ANDROID_KEY_ALIAS")
keyPassword = System.getenv("ANDROID_KEY_PASSWORD")
}
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
if (releaseStore != null) signingConfig = signingConfigs.getByName("release")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
buildFeatures { compose = true; buildConfig = true }
compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 }
testOptions { animationsDisabled = true }
sourceSets.getByName("androidTest").assets.srcDir(rootProject.file("docs"))
packaging { resources.excludes += "/META-INF/{AL2.0,LGPL2.1}" }
}
// An unsigned artifact is not an installable beta. Fail before release packaging.
tasks.matching { it.name == "validateSigningRelease" || it.name == "packageRelease" || it.name == "signReleaseBundle" }.configureEach {
doFirst { check(releaseStore != null) { "Configure the four ANDROID_KEYSTORE_* / ANDROID_KEY_* environment variables for a signed release." } }
}
dependencies {
implementation(platform("androidx.compose:compose-bom:2026.09.00"))
implementation("androidx.activity:activity-compose:1.13.0")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.11.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.11.0")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.core:core-ktx:1.17.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
androidTestImplementation(platform("androidx.compose:compose-bom:2026.09.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
androidTestImplementation("androidx.test.ext:junit:1.3.0")
androidTestImplementation("androidx.test:runner:1.7.0")
androidTestImplementation("androidx.test:rules:1.7.0")
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.3.0")
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
androidTestImplementation("androidx.test.espresso:espresso-web:3.7.0")
testImplementation("junit:junit:4.13.2")
}