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