2 alias(libs.plugins.android.application)
3 alias(libs.plugins.kotlin.android)
4 alias(libs.plugins.kotlin.compose)
5 alias(libs.plugins.kotlin.serialization)
8// Version is overridable from the release workflow via
9// `-PversionName=... -PversionCode=...`; falls back to sensible defaults locally.
10val appVersionName = (project.findProperty("versionName") as String?) ?: "0.1.0"
11val appVersionCode = (project.findProperty("versionCode") as String?)?.toIntOrNull() ?: 1
13// A release keystore is supplied by CI (decoded from a secret) via env vars.
14// When it's absent — local builds, or CI before signing is configured — the
15// release build falls back to the debug signing config so the APK is still
16// installable, rather than producing an uninstallable unsigned APK.
17val releaseStorePath: String? = System.getenv("OPENCODE_STORE_FILE")
18val hasReleaseKeystore = releaseStorePath != null && file(releaseStorePath).exists()
21 namespace = "soy.iko.opencode"
25 applicationId = "soy.iko.opencode"
28 versionCode = appVersionCode
29 versionName = appVersionName
31 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
35 if (hasReleaseKeystore) {
37 storeFile = file(releaseStorePath!!)
38 storePassword = System.getenv("OPENCODE_STORE_PASSWORD")
39 keyAlias = System.getenv("OPENCODE_KEY_ALIAS")
40 keyPassword = System.getenv("OPENCODE_KEY_PASSWORD")
47 isMinifyEnabled = true
49 getDefaultProguardFile("proguard-android-optimize.txt"),
52 signingConfig = if (hasReleaseKeystore) {
53 signingConfigs.getByName("release")
55 signingConfigs.getByName("debug")
61 sourceCompatibility = JavaVersion.VERSION_17
62 targetCompatibility = JavaVersion.VERSION_17
75 excludes += "/META-INF/{AL2.0,LGPL2.1}"
81 implementation(libs.androidx.core.ktx)
82 implementation(libs.androidx.lifecycle.runtime.ktx)
83 implementation(libs.androidx.lifecycle.runtime.compose)
84 implementation(libs.androidx.lifecycle.viewmodel.ktx)
85 implementation(libs.androidx.lifecycle.viewmodel.compose)
86 implementation(libs.androidx.activity.compose)
88 implementation(platform(libs.androidx.compose.bom))
89 implementation(libs.androidx.compose.ui)
90 implementation(libs.androidx.compose.ui.graphics)
91 implementation(libs.androidx.compose.ui.tooling.preview)
92 implementation(libs.androidx.compose.material3)
93 implementation(libs.androidx.compose.material.icons.extended)
94 debugImplementation(libs.androidx.compose.ui.tooling)
96 implementation(libs.kotlinx.coroutines.android)
97 implementation(libs.kotlinx.serialization.json)
98 implementation(libs.okhttp)
99 implementation(libs.okhttp.sse)
101 testImplementation(libs.junit)
102 testImplementation(libs.kotlinx.coroutines.test)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list