Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Jun 23, 2018
1 parent 48db9cd commit baf8914
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 42 deletions.
53 changes: 17 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,29 @@ jdk:

env:
global:
- NDK_VERSION=r12b
- NDK_CCACHE=ccache
- GOROOT_BOOTSTRAP=$GOROOT
- ANDROID_NDK_HOME=$HOME/.android/android-ndk-${NDK_VERSION}
- SBTPATH=$HOME/.sbt
- PATH=${ANDROID_NDK_HOME}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}

scala:
- 2.11.8

before_cache:
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "*.lock" | xargs rm
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- $HOME/.ivy2
- $HOME/.sbt

android:
components:
- tools
- build-tools-25.0.2
- extra-android-m2repository
- extra-google-m2repository
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

install:
- >
if [ ! -d "$ANDROID_NDK_HOME" ]; then
mkdir -p $ANDROID_NDK_HOME;
pushd $HOME/.android;
export ARCH=`uname -m`;
wget -q http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux-${ARCH}.zip;
unzip -q android-ndk-${NDK_VERSION}-linux-${ARCH}.zip;
popd;
fi
- >
if [ ! -f "$SBTPATH/sbt" ]; then
pushd $SBTPATH;
wget -q https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt;
chmod a+x sbt;
popd;
fi
- pushd $ANDROID_HOME
- rm -rf tools
- wget -q https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -O tools.zip
- unzip -q tools.zip
- popd
- touch $HOME/.android/repositories.cfg
- yes | sdkmanager
"build-tools;28.0.0"
ndk-bundle
"platforms;android-28"
>/dev/null

script:
- $SBTPATH/sbt go-build android:package
- ./gradlew assembleDebug check
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ def getCurrentFlavor() {
}

android {
compileSdkVersion rootProject.sdkVersion
buildToolsVersion "28.0.0"
compileSdkVersion 28
defaultConfig {
applicationId "com.github.shadowsocks.plugin.kcptun"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.sdkVersion
targetSdkVersion 28
versionCode 10000
versionName "0.1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ apply plugin: 'com.github.ben-manes.versions'

buildscript {
ext {
kotlinVersion = '1.2.41'
kotlinVersion = '1.2.50'
minSdkVersion = 21
sdkVersion = 27
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip

1 comment on commit baf8914

@Mygod
Copy link
Collaborator Author

@Mygod Mygod commented on baf8914 Jun 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@madeye Release update?

Please sign in to comment.