Commit 2f4a7261 authored by Roger Barton's avatar Roger Barton
Browse files

Merge branch 'ci-testing'

parents 8657728a 4ca95b3d
Pipeline #5883 passed with stages
in 3 minutes and 31 seconds
image: registry.gitlab.com/showcheap/android-ci:react-native
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- echo $PLAYSTORE_KEY > app/google-play-key.json
- echo $SIGNING_KEYSTORE > app/keystore.properties
- sed -i 's/\s\+/\n/g' app/keystore.properties
# Note: Gitlab CI variables show newlines as a space, this will render the storePath as incorrect->Throws error that signingConfig was not found
- sdkmanager "platforms;android-27"
- sdkmanager "build-tools;27.0.3"
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./gradlew
- npm install
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- .gradle/
stages:
- test
- build
- deploy
test:
stage: test
when: manual
script:
- ./gradlew check
build:
stage: build
script:
- ./gradlew assembleRelease
artifacts:
paths:
- app/build/outputs/
deploy:
stage: deploy
when: manual
dependencies:
- build
script:
- ./gradlew publishRelease
[submodule "volley"] [submodule "volley"]
path = volley
url = https://github.com/amiv-eth/volley.git url = https://github.com/amiv-eth/volley.git
### AMIV App - Android ### AMIV App - Android
This is the centralised amiv app for the android platform. This is the centralised amiv app for the android platform.
The idea is to have an app which contains all social things like events etc and to provide a platform for creating micro-apps which the amiv can use, for example a barcode generator to use as a legi. The idea is to have an app which contains all social things like events etc and to provide a platform for creating micro-apps, for example a barcode generator to use as a legi.
## To Start Developing
1. Install Android Studio, if android studio asks you to install extra stuff once opened, install it.
Gradle, the build system, will have to build first before you can edit properly.
2.
## To add your own micro-app ## To add your own micro-app
1. Install Android Studio and get set up. Not so easy as it sounds. 1. Install Android Studio and get set up. Not so easy as it sounds.
2. Create a java package under java/ch/amiv/android_app for your own java code 2. Create a java package under java/ch/amiv/android_app for your own java code
3. Name your resource files with a suitable prefix to keep the folders organised, especially the layout folder. 3. Name your resource files with a suitable prefix to keep the folders organised, especially the layout folder.
4. to be continued... 4. to be continued...
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.github.triplet.play'
// Load keystore
def keystorePropertiesFile = file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '27.0.3'
playAccountConfigs {
defaultAccountConfig {
jsonFile = file('google-play-key.json')
}
}
signingConfigs {
release {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
defaultConfig { defaultConfig {
applicationId "ch.amiv.android_app" applicationId "ch.amiv.android_app"
minSdkVersion 23 minSdkVersion 23
...@@ -11,8 +34,10 @@ android { ...@@ -11,8 +34,10 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
} }
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
...@@ -40,3 +65,9 @@ dependencies { ...@@ -40,3 +65,9 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
} }
play {
track = 'production'
uploadImages = true
errorOnSizeLimit = true
}
\ No newline at end of file
storeFile=testkeystore.jks
storePassword=000000
keyAlias=release
keyPassword=000000
\ No newline at end of file
...@@ -158,7 +158,7 @@ public final class ServerRequests { ...@@ -158,7 +158,7 @@ public final class ServerRequests {
Log.e("postrequest", "Params sent: pin=" + MainActivity.CurrentPin + ", URL used: " + SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT); Log.e("postrequest", "Params sent: pin=" + MainActivity.CurrentPin + ", URL used: " + SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT);
JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT, JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT,
null, new Response.Listener<JSONObject>() { (JSONObject) null, new Response.Listener<JSONObject>() {
@Override @Override
public void onResponse(JSONObject response) { public void onResponse(JSONObject response) {
// Parsing json object response and save to the static memberDB, parse each part in a separate try catch, so we get as much info as possible // Parsing json object response and save to the static memberDB, parse each part in a separate try catch, so we get as much info as possible
......
...@@ -8,7 +8,7 @@ buildscript { ...@@ -8,7 +8,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.github.triplet.gradle:play-publisher:1.2.2'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
......
Subproject commit 075a0285ec32dc608782be2298504b398f3e5721 Subproject commit 2ac23ae09470d435373a1d4fe6c621e22bfcf8f3
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