feat: add remote audiobook generation
This commit is contained in:
+23
-7
@@ -1,7 +1,15 @@
|
||||
plugins {
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
val audiobookApiTokenFile = file("${System.getProperty("user.home")}/.aletheia/audiobook-api-token.txt")
|
||||
val audiobookApiToken = if (audiobookApiTokenFile.isFile) {
|
||||
audiobookApiTokenFile.readText().trim()
|
||||
} else {
|
||||
""
|
||||
}
|
||||
fun quotedBuildConfig(value: String): String =
|
||||
"\"${value.replace("\\", "\\\\").replace("\"", "\\\"")}\""
|
||||
|
||||
android {
|
||||
namespace = "com.aletheia.app"
|
||||
@@ -11,8 +19,15 @@ android {
|
||||
applicationId = "com.aletheia.app"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 45
|
||||
versionName = "2.34"
|
||||
versionCode = 48
|
||||
versionName = "2.37"
|
||||
|
||||
buildConfigField(
|
||||
"String",
|
||||
"AUDIOBOOK_API_BASE_URL",
|
||||
quotedBuildConfig("https://argus.kusoft.xyz/aletheia-tts/")
|
||||
)
|
||||
buildConfigField("String", "AUDIOBOOK_API_TOKEN", quotedBuildConfig(audiobookApiToken))
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
@@ -49,6 +64,7 @@ android {
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
packaging {
|
||||
@@ -57,9 +73,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
androidResources {
|
||||
noCompress += "onnx"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -74,7 +87,10 @@ dependencies {
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||
implementation("androidx.webkit:webkit:1.12.1")
|
||||
implementation("com.microsoft.onnxruntime:onnxruntime-android:1.27.0")
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.json:json:20240303")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.test:runner:1.6.2")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user