Gradle fix (#978)
This commit is contained in:
parent
6931dbe79c
commit
78d5a99441
3 changed files with 26 additions and 19 deletions
|
@ -8,9 +8,12 @@ build apk:
|
||||||
stage: build
|
stage: build
|
||||||
image: lbry/android-base:platform-28
|
image: lbry/android-base:platform-28
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get -y update && apt-get -y install build-essential ca-certificates curl git gpg-agent openjdk-8-jdk software-properties-common wget zipalign
|
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
|
||||||
|
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
|
||||||
|
- apt-get -y update && apt-get -y install build-essential ca-certificates curl git gpg-agent openjdk-8-jdk software-properties-common wget zipalign git-secret
|
||||||
|
- git secret reveal
|
||||||
- chmod u+x $CI_PROJECT_DIR/gradlew
|
- chmod u+x $CI_PROJECT_DIR/gradlew
|
||||||
- export ANDROID_SDK_ROOT=~/.buildozer/android/platform/android-sdk-23
|
|
||||||
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
|
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -19,16 +22,11 @@ build apk:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
script:
|
script:
|
||||||
- export PATH=/usr/bin:$PATH
|
- export PATH=/usr/bin:$PATH
|
||||||
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
|
- export ANDROID_SDK_ROOT=~/.buildozer/android/platform/android-sdk-23
|
||||||
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
|
|
||||||
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
|
|
||||||
- apt-get -y update && apt-get -y install git-secret
|
|
||||||
- git secret reveal
|
|
||||||
- yarn
|
|
||||||
- chmod u+x ./release.sh
|
- chmod u+x ./release.sh
|
||||||
- ./release.sh
|
- ./release.sh
|
||||||
- cp bin/browser-$BUILD_VERSION-release__arm.apk $CI_PROJECT_DIR
|
- cp bin/browser-$BUILD_VERSION-release__arm.apk /dev/null
|
||||||
- cp bin/browser-$BUILD_VERSION-release__arm64.apk $CI_PROJECT_DIR
|
- cp bin/browser-$BUILD_VERSION-release__arm64.apk /dev/null
|
||||||
|
|
||||||
deploy build.lbry.io:
|
deploy build.lbry.io:
|
||||||
image: python:stretch
|
image: python:stretch
|
||||||
|
@ -36,9 +34,13 @@ deploy build.lbry.io:
|
||||||
dependencies:
|
dependencies:
|
||||||
- build apk
|
- build apk
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get -y update && apt-get -y install openjdk-8-jdk
|
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
|
||||||
|
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
|
||||||
|
- apt-get -y update && apt-get -y install openjdk-8-jdk git-secret
|
||||||
- pip install awscli
|
- pip install awscli
|
||||||
- chmod u+x $CI_PROJECT_DIR/gradlew
|
- chmod u+x $CI_PROJECT_DIR/gradlew
|
||||||
|
- git secret reveal
|
||||||
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
|
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
|
||||||
- export BUILD_APK_FILENAME__32=browser-$BUILD_VERSION-release__arm.apk
|
- export BUILD_APK_FILENAME__32=browser-$BUILD_VERSION-release__arm.apk
|
||||||
- export BUILD_APK_FILENAME__64=browser-$BUILD_VERSION-release__arm64.apk
|
- export BUILD_APK_FILENAME__64=browser-$BUILD_VERSION-release__arm64.apk
|
||||||
|
@ -55,8 +57,12 @@ release apk:
|
||||||
dependencies:
|
dependencies:
|
||||||
- build apk
|
- build apk
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get -y update && apt-get -y install openjdk-8-jdk
|
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
|
||||||
|
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
|
||||||
|
- apt-get -y update && apt-get -y install openjdk-8-jdk git-secret
|
||||||
- pip install awscli githubrelease
|
- pip install awscli githubrelease
|
||||||
|
- git secret reveal
|
||||||
- chmod u+x $CI_PROJECT_DIR/gradlew
|
- chmod u+x $CI_PROJECT_DIR/gradlew
|
||||||
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
|
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
|
||||||
- export BUILD_APK_FILENAME__32=browser-$BUILD_VERSION-release__arm.apk
|
- export BUILD_APK_FILENAME__32=browser-$BUILD_VERSION-release__arm.apk
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
import com.google.gms.googleservices.GoogleServicesPlugin
|
import com.google.gms.googleservices.GoogleServicesPlugin
|
||||||
|
|
||||||
Properties twitterProps = new Properties()
|
|
||||||
try {
|
|
||||||
twitterProps.load(project.file('twitter.properties').newDataInputStream())
|
|
||||||
} catch (Exception ex) {
|
|
||||||
throw new GradleException("Missing twitter.properties.")
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -50,10 +43,14 @@ android {
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
|
Properties twitterProps = new Properties()
|
||||||
|
twitterProps.load(project.file('twitter.properties').newDataInputStream())
|
||||||
resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\""
|
resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\""
|
||||||
resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\""
|
resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\""
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
Properties twitterProps = new Properties()
|
||||||
|
twitterProps.load(project.file('twitter.properties').newDataInputStream())
|
||||||
resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\""
|
resValue "string", "TWITTER_CONSUMER_KEY", "\"${twitterProps.getProperty("twitterConsumerKey")}\""
|
||||||
resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\""
|
resValue "string", "TWITTER_CONSUMER_SECRET", "\"${twitterProps.getProperty("twitterConsumerSecret")}\""
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
|
|
4
yarn.lock
Normal file
4
yarn.lock
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue