Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 3f047dc

Browse files
committed
Fix Travis CI and build
1 parent 0204d39 commit 3f047dc

File tree

4 files changed

+74
-6
lines changed

4 files changed

+74
-6
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ before_install:
77
before_script:
88
- echo sdk.dir $ANDROID_HOME > local.properties
99
script:
10+
- jdk_switcher use oraclejdk8
1011
- export TERM=dumb
1112
- export JAVA_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
1213
- ./gradlew build
1314
android:
1415
components:
15-
- platform-tools
1616
- tools
17-
- build-tools-23.0.2
18-
- android-23
17+
- platform-tools
18+
- build-tools-24.0.3
19+
- android-24
1920
- extra-android-m2repository
2021
before_cache:
2122
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

build.gradle

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright 2013-2016 microG Project Team
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
buildscript {
18+
repositories {
19+
jcenter()
20+
}
21+
dependencies {
22+
classpath 'com.android.tools.build:gradle:2.2.2'
23+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
24+
}
25+
}
26+
27+
allprojects {
28+
apply plugin: 'idea'
29+
ext.androidBuildVersionTools = "24.0.3"
30+
ext.isReleaseVersion = false
31+
}
32+
33+
def androidCompileSdk() { return 24 }
34+
35+
def androidTargetSdk() { return 24 }
36+
37+
def androidMinSdk() { return 9 }
38+
39+
def versionCode() {
40+
def stdout = new ByteArrayOutputStream()
41+
exec { commandLine 'git', 'rev-list', '--count', "HEAD"; standardOutput = stdout }
42+
return Integer.parseInt(stdout.toString().trim())
43+
}
44+
45+
def versionName() {
46+
def stdout = new ByteArrayOutputStream()
47+
if (rootProject.file("gradlew").exists())
48+
exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout }
49+
else // automatic build system, don't tag dirty
50+
exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout }
51+
return stdout.toString().trim().substring(1)
52+
}
53+
54+
subprojects {
55+
group = 'org.microg'
56+
repositories {
57+
jcenter()
58+
}
59+
60+
tasks.withType(JavaCompile) {
61+
sourceCompatibility = JavaVersion.VERSION_1_7
62+
targetCompatibility = JavaVersion.VERSION_1_7
63+
}
64+
}
65+

fake-store/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ int getMyVersionCode() {
3535
}
3636

3737
android {
38-
compileSdkVersion 24
39-
buildToolsVersion "24.0.3"
38+
compileSdkVersion androidCompileSdk()
39+
buildToolsVersion "$androidBuildVersionTools"
4040

4141
defaultConfig {
4242
versionName getMyVersionName()
4343
versionCode getMyVersionCode()
44+
minSdkVersion androidMinSdk()
45+
targetSdkVersion androidTargetSdk()
4446
}
4547

4648
compileOptions {

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

0 commit comments

Comments
 (0)