diff --git a/README.md b/README.md index 0915d0d..b8030af 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,21 @@ yarn react-native start react-native run-android + +## Development + # Improve compile times + touch ~/.gradle/gradle.properties && echo -e "org.gradle.daemon=true\norg.gradle.jvmargs=-Xmx2048M" >> ~/.gradle/gradle.properties + +## Create release build (Android) + # Aquire the keystore and put it in android/app/dusken-client.keystore + + # Put these properties in ~/.gradle/gradle.properties along with the correct passwords + DUSKEN_RELEASE_STORE_FILE=dusken-client.keystore + DUSKEN_RELEASE_KEY_ALIAS=dusken-client + DUSKEN_RELEASE_STORE_PASSWORD= + DUSKEN_RELEASE_KEY_PASSWORD= + + # Build + cd android && ./gradlew assembleRelease + + # Output is in android/app/build/outputs/apk \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 40916bf..47f9893 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -94,11 +94,11 @@ android { buildToolsVersion "23.0.2" defaultConfig { - applicationId "com.dusken" + applicationId "no.neuf.chateau" minSdkVersion 16 targetSdkVersion 22 - versionCode 1 - versionName "1.0" + versionCode 5 + versionName "0.1" ndk { abiFilters "armeabi-v7a", "x86" } @@ -111,10 +111,30 @@ android { include "armeabi-v7a", "x86" } } + signingConfigs { + release { + // locally + if (project.hasProperty('DUSKEN_RELEASE_STORE_FILE')) { + storeFile file(DUSKEN_RELEASE_STORE_FILE) + storePassword DUSKEN_RELEASE_STORE_PASSWORD + keyAlias DUSKEN_RELEASE_KEY_ALIAS + keyPassword DUSKEN_RELEASE_KEY_PASSWORD + } + // bitrise.io + else if (System.getenv('BITRISEIO_ANDROID_KEYSTORE_URL')) { + storeFile file(System.getenv("HOME") + "/keystores/my_keystore.jks") + storePassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD") + keyAlias System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS") + keyPassword System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD") + + } + } + } buildTypes { release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + signingConfig signingConfigs.release } } // applicationVariants are e.g. debug, release diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 840955b..ef6ae0a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,17 @@ - + + + + + + + - Dusken + Chateau Neuf diff --git a/android/app/src/release/AndroidManifest.xml b/android/app/src/release/AndroidManifest.xml new file mode 100644 index 0000000..11d2c3d --- /dev/null +++ b/android/app/src/release/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file