Commit c9bb4068 authored by Lukas Gehrke's avatar Lukas Gehrke
Browse files

Configure android app to run locally and communicate to backend.

parent 3dda9f9a
Pipeline #50171 failed with stage
in 9 seconds
......@@ -38,7 +38,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.culture4life
matchingFallbacks = ['release']
buildConfigField "String", "API_BASE_URL", '"https://app.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"http://10.0.2.2:8080"'
buildConfigField "String", "STAGING_API_USERNAME", '""'
buildConfigField "String", "STAGING_API_PASSWORD", '""'
buildConfigField "String", "COMMIT_HASH", project.getProperties().getOrDefault("COMMIT_HASH", '"<commit hash>"')
......@@ -46,11 +46,11 @@ android {
debug {
debuggable true
minifyEnabled false
versionNameSuffix " Dev"
versionNameSuffix " Debug"
applicationIdSuffix ".dev"
signingConfig signingConfigs.debug
matchingFallbacks = ['debug']
buildConfigField "String", "API_BASE_URL", '"https://app-dev.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"http://10.0.2.2:8001"'
buildConfigField "String", "STAGING_API_USERNAME", project.getProperties().getOrDefault("STAGING_API_USERNAME", '"<staging username>"')
buildConfigField "String", "STAGING_API_PASSWORD", project.getProperties().getOrDefault("STAGING_API_PASSWORD", '"<staging password>"')
buildConfigField "String", "COMMIT_HASH", project.getProperties().getOrDefault("COMMIT_HASH", '"<commit hash>"')
......@@ -59,55 +59,55 @@ android {
initWith debug
versionNameSuffix " QS"
applicationIdSuffix ".qs"
buildConfigField "String", "API_BASE_URL", '"https://app-qs.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"http://10.0.2.2:8080"'
}
aqs {
initWith debug
versionNameSuffix " AQS"
applicationIdSuffix ".aqs"
buildConfigField "String", "API_BASE_URL", '"https://app-aqs.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
hotfix {
initWith debug
versionNameSuffix " Hotfix"
applicationIdSuffix ".hotfix"
buildConfigField "String", "API_BASE_URL", '"https://app-hotfix.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
pentest {
initWith debug
versionNameSuffix " Pentest"
applicationIdSuffix ".pentest"
buildConfigField "String", "API_BASE_URL", '"https://app-pentest.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
p1 {
initWith debug
versionNameSuffix " P1"
applicationIdSuffix ".p1"
buildConfigField "String", "API_BASE_URL", '"https://app-p1.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
p2 {
initWith debug
versionNameSuffix " P2"
applicationIdSuffix ".p2"
buildConfigField "String", "API_BASE_URL", '"https://app-p2.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
p3 {
initWith debug
versionNameSuffix " P3"
applicationIdSuffix ".p3"
buildConfigField "String", "API_BASE_URL", '"https://app-p3.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
demo {
initWith debug
versionNameSuffix " Demo"
applicationIdSuffix ".demo"
buildConfigField "String", "API_BASE_URL", '"https://app-demo.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
release {
initWith debug
versionNameSuffix " Release"
applicationIdSuffix ".release"
buildConfigField "String", "API_BASE_URL", '"https://app-release.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
preprod {
initWith debug
......@@ -117,7 +117,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
versionNameSuffix " Preprod"
applicationIdSuffix ".preprod"
buildConfigField "String", "API_BASE_URL", '"https://app-preprod.luca-app.de"'
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
}
}
buildFeatures {
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.culture4life.luca">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:networkSecurityConfig="@xml/network_security_config" />
......
-----BEG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59KGL4F1TQSrvrJvv/WCWnn9FXCL+8qZ6KPMw0/yBKiRNZFE+
4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
HQ4EFgQUZqS3xKyYiyGGha5zuKOTqiyfeyAwDQYJKoZIhvcNAQENBQADggIBAJ6e
vCKlqhXpQ6a9ki9ls8GV01M2lqOk3t8XPK3qPC1kpyoc2gUFDzAVC1SubZTIQdVx
RipoxnHHX6sJoDgJLOOIZ+YgkMCLBlSPGZLSw6CdfzvguKxF4dAntpEZD5xQMXCB
EV/Sq0Zv13ug4uu4RY0YtR6kYnUOpTv7oc/2KAI9YpgauneIG4GjDuXZNC9TVetE
p8/4OO74xB2cXfwDDTFY2Rgg2KUlGguITsRaa2fM9PL5fWFJzxGyl0r9SNmVt0/Y
Df4FzxGmFE1n6dcYdA4k96c/ioen9HBDs4hqt1/LjLfZaaBHkiUmP0P4PUNTLdx1
B2lIxiLJ4SSHJpoahJbYtrJ+yWf78AiK3NteNjC/WRKHYkO550fz6g0Z97/kH3yE
cZhnCb3loS5lIkIao6IS+ndAm0Y+dKLC4pMsYhfkCe4zxbtD+bdT01NMn0bt5F80
HWazyeoyNsMDmRZsmUSc6/Bs47BuIny8mN6sHUqtCXeZGtfK/GIUovM2ZGzRgNuR
u98PJ3aTBxkOzGR2CnV1aOmEzhzRaloSeadgxIIOZkoqKzyR4A1+Ey38Iw5mHWZ2
647T+jz0onkmQuMpMYWz2HrN8LtYjJcYnBU3Ip82VPQtSKLCVAnd2UNgPhT9ZviF
ekhNYkD1AqIamXXnCNKdwLsGdksUo3HW6Z4TbMiv
-----END CERTIFICATE-----
......@@ -3,6 +3,7 @@
<base-config>
<trust-anchors>
<certificates src="system" />
<certificates src="@raw/ca_root"/>
</trust-anchors>
</base-config>
<debug-overrides>
......@@ -10,4 +11,7 @@
<certificates src="user" />
</trust-anchors>
</debug-overrides>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">10.0.2.2</domain>
</domain-config>
</network-security-config>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment