Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

Commit d9b1dda

Browse files
committed
chore (build): Update some values, add exts value
1 parent 5de92bf commit d9b1dda

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

app/build.gradle

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ android {
3737
localProperties.load(new FileInputStream(localPropertiesFile))
3838
}
3939

40-
def ghUser = System.getProperty("github_updates_repo")
41-
?: localProperties.getProperty("github_updates_repo", "")
40+
// Put your GitHub username in this flag when building for in-app update feature
41+
// -Dgh_username=
42+
def ghUser = System.getProperty("gh_username")
43+
?: localProperties.getProperty("gh_username", "")
44+
resValue "string", "gh_username", ghUser
45+
46+
// Put your Telegram bot token in this flag when building for Telegram backup feature
47+
// -Dtg_backup_bot_token=
4248
def tgKey = System.getProperty("tg_backup_bot_token")
4349
?: localProperties.getProperty("tg_backup_bot_token", "")
44-
45-
resValue "string", "github_updates_repo", ghUser
4650
resValue 'string', 'tg_backup_bot_token', tgKey
4751
}
4852
signingConfigs {
@@ -140,9 +144,16 @@ android {
140144
}
141145
}
142146
dependencies {
143-
implementation(libs.doki.exts) {
144-
exclude group: 'org.json', module: 'json'
145-
}
147+
def exts = libs.versions.exts.get()
148+
if (System.properties.containsKey('exts')) {
149+
// Use this flag with build command for auto-fetch and replace:
150+
// -Dexts=$(curl -s https://api.github.com/repos/DokiTeam/doki-exts/commits/base -H "Accept: application/vnd.github.sha" | cut -c -10)
151+
exts = System.getProperty('exts')
152+
}
153+
//noinspection UseTomlInstead
154+
implementation("com.github.DokiTeam:doki-exts:$exts") {
155+
exclude group: 'org.json', module: 'json'
156+
}
146157

147158
coreLibraryDesugaring libs.desugar.jdk.libs
148159
implementation libs.kotlin.stdlib

app/src/main/kotlin/org/dokiteam/doki/core/github/AppUpdateRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AppUpdateRepository @Inject constructor(
3737
@ApplicationContext context: Context,
3838
) {
3939

40-
private val user: String = context.getString(R.string.github_updates_repo)
40+
private val user: String = context.getString(R.string.gh_username)
4141
private val availableUpdate = MutableStateFlow<AppVersion?>(null)
4242
private val releasesUrl = buildString {
4343
append("https://api.github.com/repos/")

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ coil-svg = { module = "io.coil-kt.coil3:coil-svg", version.ref = "coil" }
9090
conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "conscrypt" }
9191
desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar" }
9292
disk-lru-cache = { module = "com.github.solkin:disk-lru-cache", version.ref = "diskLruCache" }
93-
doki-exts = { module = "com.github.DokiTeam:doki-exts", version.ref = "exts" }
9493
guava = { module = "com.google.guava:guava", version.ref = "guava" }
9594
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "dagger" }
9695
hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "dagger" }

0 commit comments

Comments
 (0)