Load Ouinet settings from local.properties file using Gradle
This commit is contained in:
parent
624e199e6b
commit
4bd35009cd
|
@ -3,6 +3,9 @@ plugins {
|
|||
id 'kotlin-android'
|
||||
}
|
||||
|
||||
Properties localProperties = new Properties()
|
||||
localProperties.load(rootProject.file('local.properties').newDataInputStream())
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
|
||||
|
@ -14,6 +17,10 @@ android {
|
|||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
buildConfigField "String", "CACHE_PUB_KEY", localProperties['CACHE_PUB_KEY']
|
||||
buildConfigField "String", "INJECTOR_CREDENTIALS", localProperties['INJECTOR_CREDENTIALS']
|
||||
buildConfigField "String", "INJECTOR_TLS_CERT", localProperties['INJECTOR_TLS_CERT']
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
|
|
@ -12,6 +12,9 @@ class MainActivity : AppCompatActivity() {
|
|||
var config = Config.ConfigBuilder(this)
|
||||
.setCacheType("bep5-http")
|
||||
.setTlsCaCertStorePath("file:///android_asset/cacert.pem")
|
||||
.setCacheHttpPubKey(BuildConfig.CACHE_PUB_KEY)
|
||||
.setInjectorCredentials(BuildConfig.INJECTOR_CREDENTIALS)
|
||||
.setInjectorTlsCert(BuildConfig.INJECTOR_TLS_CERT)
|
||||
.build()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user