Commit c4705409 authored by Roger Barton's avatar Roger Barton
Browse files

Added Gitlab CI

parent ac6cb774
Pipeline #5756 failed with stages
in 6 minutes and 19 seconds
image: registry.gitlab.com/showcheap/android-ci:react-native
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- sdkmanager "platforms;android-27"
- sdkmanager "build-tools;28.0.2"
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./gradlew
- npm install
- echo $PLAYSTORE_KEY > app/google-play-key.json
- echo $SIGNING_KEYSTORE > app/keystore.properties
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- .gradle/
stages:
- test
- build
- deploy
test:
stage: test
script:
- ./gradlew check
build:
stage: build
script:
- ./gradlew assembleRelease
artifacts:
paths:
- app/build/outputs/
deploy:
stage: deploy
when: manual
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 '28.0.2'
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
...@@ -13,6 +36,7 @@ android { ...@@ -13,6 +36,7 @@ android {
} }
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 +64,9 @@ dependencies { ...@@ -40,3 +64,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=release_keystore.jks
storePassword=000000
keyAlias=releaseKey
keyPassword=000000
\ No newline at end of file
...@@ -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
......
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