Externalize PUSH_GATEWAY_URL and clean up signing config
- Move PUSH_GATEWAY_URL from hardcoded constant to BuildConfig field, read from PUSH_GATEWAY_URL env var at build time - Hardcode keyAlias="release" and remove storeType (PKCS12 is default), since these are fixed values in android-signing-env - Remove unused okhttp3.Interceptor import Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d4b37437a3
commit
863cbb6b79
2 changed files with 4 additions and 5 deletions
|
|
@ -16,13 +16,14 @@ android {
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "0.1.0"
|
versionName = "0.1.0"
|
||||||
|
buildConfigField("String", "PUSH_GATEWAY_URL",
|
||||||
|
"\"${System.getenv("PUSH_GATEWAY_URL") ?: ""}\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("release") {
|
create("release") {
|
||||||
storeFile = file(System.getenv("ANDROID_KEYSTORE_PATH") ?: "")
|
storeFile = file(System.getenv("ANDROID_KEYSTORE_PATH") ?: "")
|
||||||
storeType = System.getenv("ANDROID_KEYSTORE_TYPE") ?: "PKCS12"
|
keyAlias = "release"
|
||||||
keyAlias = System.getenv("ANDROID_KEY_ALIAS") ?: ""
|
|
||||||
storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD") ?: ""
|
storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD") ?: ""
|
||||||
keyPassword = System.getenv("ANDROID_KEY_PASSWORD") ?: ""
|
keyPassword = System.getenv("ANDROID_KEY_PASSWORD") ?: ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import okhttp3.MediaType.Companion.toMediaType
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import com.ltadeu6.matrix.BuildConfig
|
import com.ltadeu6.matrix.BuildConfig
|
||||||
import okhttp3.Interceptor
|
|
||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import java.util.concurrent.atomic.AtomicInteger
|
import java.util.concurrent.atomic.AtomicInteger
|
||||||
|
|
@ -1360,8 +1359,7 @@ class MatrixSession private constructor(private val appContext: Context) {
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "MatrixCrypto"
|
private const val TAG = "MatrixCrypto"
|
||||||
|
|
||||||
/** Cloudflare Worker push gateway URL. */
|
val PUSH_GATEWAY_URL: String get() = BuildConfig.PUSH_GATEWAY_URL
|
||||||
const val PUSH_GATEWAY_URL = "https://matrix-push-gateway.ltadeu6.workers.dev"
|
|
||||||
@Volatile private var instance: MatrixSession? = null
|
@Volatile private var instance: MatrixSession? = null
|
||||||
|
|
||||||
fun getInstance(context: Context): MatrixSession =
|
fun getInstance(context: Context): MatrixSession =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue