security: Hide secrets for ACRA
This commit is contained in:
parent
6efb5998ae
commit
0d4ba49111
@ -1,6 +1,12 @@
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
alias(libs.plugins.jetbrainsKotlinAndroid)
|
||||
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
|
||||
|
||||
}
|
||||
|
||||
secrets {
|
||||
propertiesFileName = "secrets.properties"
|
||||
}
|
||||
|
||||
android {
|
||||
@ -36,6 +42,7 @@ android {
|
||||
buildFeatures {
|
||||
compose = true
|
||||
viewBinding = true
|
||||
buildConfig = true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.1"
|
||||
|
@ -2,24 +2,23 @@ package ru.sweetbread.unn.ui
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import org.acra.BuildConfig
|
||||
import org.acra.config.httpSender
|
||||
import org.acra.data.StringFormat
|
||||
import org.acra.ktx.initAcra
|
||||
import org.acra.sender.HttpSender
|
||||
import ru.sweetbread.unn.BuildConfig
|
||||
|
||||
class UNNApp : Application() {
|
||||
override fun attachBaseContext(base: Context) {
|
||||
super.attachBaseContext(base)
|
||||
|
||||
initAcra {
|
||||
//core configuration:
|
||||
buildConfigClass = BuildConfig::class.java
|
||||
reportFormat = StringFormat.JSON
|
||||
httpSender {
|
||||
uri = "/report"
|
||||
basicAuthLogin = "5Fh9roh02J2BUyNl"
|
||||
basicAuthPassword = "tTWalio7NVosHohT"
|
||||
uri = BuildConfig.ACRA_URL
|
||||
basicAuthLogin = BuildConfig.ACRA_LOGIN
|
||||
basicAuthPassword = BuildConfig.ACRA_PASS
|
||||
httpMethod = HttpSender.Method.POST
|
||||
}
|
||||
}
|
||||
|
@ -2,4 +2,10 @@
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication) apply false
|
||||
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
|
||||
}
|
||||
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath(libs.secrets.gradle.plugin)
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ lifecycleLivedataKtx = "2.7.0"
|
||||
lifecycleViewmodelKtx = "2.7.0"
|
||||
activity = "1.8.2"
|
||||
navigationCompose = "2.7.7"
|
||||
secretsGradlePlugin = "2.0.1"
|
||||
splittiesFunPackAndroidBaseWithViewsDsl = "3.0.0"
|
||||
commonsText = "1.11.0"
|
||||
|
||||
@ -56,6 +57,7 @@ androidx-constraintlayout = { group = "androidx.constraintlayout", name = "const
|
||||
androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
||||
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||
secrets-gradle-plugin = { module = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin", version.ref = "secretsGradlePlugin" }
|
||||
splitties-funpack-android-base-with-views-dsl = { module = "com.louiscad.splitties:splitties-fun-pack-android-base-with-views-dsl", version.ref = "splittiesFunPackAndroidBaseWithViewsDsl" }
|
||||
commons-text = { group = "org.apache.commons", name = "commons-text", version.ref = "commonsText" }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user