diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03779d21b24a0a2efc68e156bf9d7c971edf1146..56c925c92d02f33b84a65638a0406a734d027364 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ stages: before_script: - git submodule update --init --recursive +- echo email.key $EMAIL_KEY >> local.properties - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew diff --git a/app/build.gradle b/app/build.gradle index 6b5f9e45679a3bd938741493bb59ee1d2da89a4e..9b4d27e90ec263f78266234479931ffa6911f590 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,6 +33,7 @@ android { multiDexEnabled true // >64k methods for Android 4.4 buildConfigField "String", "userAgent", "\"DAVx5\"" + buildConfigField "String", "EMAIL_KEY", "\"${emailKey()}\"" // when using this, make sure that notification icons are real bitmaps vectorDrawables.useSupportLibrary = true @@ -161,3 +162,13 @@ dependencies { testImplementation 'junit:junit:4.12' testImplementation "com.squareup.okhttp3:mockwebserver:${versions.okhttp}" } + +def emailKey() { + Properties properties = new Properties() + try { + properties.load(project.rootProject.file('local.properties').newDataInputStream()) + } catch (ignored) { + // Ignore + } + return properties.getProperty("email.key", "invalid") +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 66670365ae6a3ec95f704aae8f240480a0ff4455..56c6697d4f09d137d69eda5cb3c4def618e18cc7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -44,6 +44,16 @@ android:label="@string/app_name" android:theme="@style/AppTheme" tools:ignore="UnusedAttribute"> + + + + + + @@ -207,7 +217,7 @@ android:name="android.accounts.AccountAuthenticator" android:resource="@xml/eelo_account_authenticator" /> - + - + @@ -235,7 +245,7 @@ android:name="android.content.SyncAdapter" android:resource="@xml/eelo_sync_tasks" /> - + - + - - + + - + (R.id.instructions) + val formattedText = view.context.getText(R.string.instructions) + instructions.text = formattedText + view.findViewById