merge with default
This commit is contained in:
@@ -26,6 +26,8 @@ android/.DS_Store
|
||||
android/captures
|
||||
android/gradle
|
||||
|
||||
output/
|
||||
|
||||
ios/.idea/
|
||||
ios/.vagrant/
|
||||
ios/.sconsign.dblite
|
||||
|
||||
50
Makefile
50
Makefile
@@ -1,18 +1,46 @@
|
||||
PHONY: all
|
||||
#!make
|
||||
|
||||
all: build-release upload
|
||||
include build.variables
|
||||
export $(shell sed 's/=.*//' build.variables)
|
||||
|
||||
upload-release: build-release
|
||||
adb install -r build/app/outputs/apk/app-release.apk
|
||||
FLAGS :=
|
||||
|
||||
upload: build-debug
|
||||
adb install -r build/app/outputs/apk/app-debug.apk
|
||||
|
||||
build-debug:
|
||||
flutter build apk --debug
|
||||
android-apps: pub-get apk-prod apk-ote apk-int apk-staging apk-testing apk-autobonus apk-racib archive
|
||||
|
||||
build-release:
|
||||
flutter build apk
|
||||
|
||||
archive:
|
||||
rm -fR output
|
||||
mkdir -p output
|
||||
rsync build/app/outputs/apk/*/*/*.apk output
|
||||
|
||||
apk-prod:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect || echo "prod"
|
||||
|
||||
apk-ote:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect_ote || echo "ote"
|
||||
|
||||
apk-int:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect_int || echo "int"
|
||||
|
||||
apk-staging:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect_staging || echo "staging"
|
||||
|
||||
apk-testing:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect_testing || echo "testing"
|
||||
|
||||
apk-autobonus:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor autobonus || echo "autobonus"
|
||||
|
||||
apk-racib:
|
||||
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor racib || echo "racib"
|
||||
|
||||
pub-get:
|
||||
flutter pub get
|
||||
|
||||
clean:
|
||||
flutter build clean
|
||||
flutter clean
|
||||
rm -fR output
|
||||
|
||||
bootstrap:
|
||||
flutter version $(FLUTTER_VERSION)
|
||||
|
||||
@@ -189,6 +189,16 @@ android {
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
}
|
||||
}
|
||||
|
||||
splits {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include "armeabi-v7a", "arm64-v8a"
|
||||
universalApk false
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
|
||||
4
build.variables
Normal file
4
build.variables
Normal file
@@ -0,0 +1,4 @@
|
||||
VERSION=1.0
|
||||
VERSION_NAME=1
|
||||
|
||||
FLUTTER_VERSION=v1.9.1+hotfix.4
|
||||
33
jenkinsfile.android
Normal file
33
jenkinsfile.android
Normal file
@@ -0,0 +1,33 @@
|
||||
node('android') {
|
||||
try {
|
||||
stage 'Clean from prevoius build'
|
||||
sh """
|
||||
rm -fR build/ || echo "dir does not exist";
|
||||
"""
|
||||
|
||||
stage 'Checkout branch'
|
||||
checkout scm
|
||||
|
||||
stage 'Assemble applications'
|
||||
sh """
|
||||
source ~/.profile
|
||||
make android-apps
|
||||
"""
|
||||
archiveArtifacts artifacts: 'output/*.apk'
|
||||
|
||||
} catch(err) {
|
||||
currentBuild.result = "FAILURE"
|
||||
|
||||
/*mail body: "project build error: ${err}" ,*/
|
||||
/*from: 'ci@dinect.com',*/
|
||||
/*replyTo: 'm.sokolov@dinect.com',*/
|
||||
/*subject: 'project build failed',*/
|
||||
/*to: 'm.sokolov@dinect.com'*/
|
||||
|
||||
throw err
|
||||
} finally{
|
||||
sh """
|
||||
echo "Build failed"
|
||||
"""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user