Skip to content

Commit

Permalink
Updating gradle version, adding flavorDimensions (#198)
Browse files Browse the repository at this point in the history
* Updating gradle version, adding flavorDimensions

* See if travis is happier w/ JDK ocho.

* Add android-21 to travis components.

* Another Travis fix attempt...

* Adding an emulator to see if that helps travis build.

* Don't use `platform-tools` as that uses the latest android version.

* Try Android v26 for Travis

* Use android 26 in `build.gradle`.

* Adding back the android tools

* Trying gradle 3.

* Add newer maven repos.

* Add google() repo.

* Accept all licenses.

* We only need one flavor dimension.

* Use an older version of the Android emulator.

* Fixing emulator version mismatch

* Back to using api 26...

* Changing target to android 25, I guess android 26 doesn't offer an arm based emulator.

* Use older version of build tools and gradle plugin.

* Trying solution from https://stackoverflow.com/a/42471021

* Back to android-21...
  • Loading branch information
roundhill authored Mar 16, 2018
1 parent 896e5fb commit f33d6d6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
language: android
jdk: oraclejdk7
jdk: oraclejdk8
sudo: false
env:
matrix:
- ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
android:
components:
- tools
- platform-tools
- tools
- build-tools-21.1.2
licenses:
- android-sdk-license-5be876d5
- android-21
- extra-android-m2repository
- sys-img-armeabi-v7a-android-21

before_script:
# compile the code so gradle and dependencies are all downloaded
Expand Down
15 changes: 12 additions & 3 deletions Simperium/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies { classpath 'com.android.tools.build:gradle:1.0.0' }
dependencies { classpath 'com.android.tools.build:gradle:2.0.0' }
}

apply plugin: 'com.android.library'
Expand All @@ -15,8 +16,10 @@ version gitVersion()
group "com.simperium"

repositories {
jcenter()
mavenCentral()
maven { url "http://simperium.github.io/simperium-android" }
maven { url "https://maven.google.com" }
}

android {
Expand All @@ -41,11 +44,17 @@ android {
buildConfigField 'String', 'SIMPERIUM_COM_SPKI', '"e25695097d04927c9d90206333a687a7b1f99708"'
}

flavorDimensions "main"

productFlavors {
// client is the main production build
client
client {
dimension "main"
}
// support build is for running tests and includes mock code
support
support {
dimension "main"
}
}

}
Expand Down
2 changes: 1 addition & 1 deletion SimperiumIntegrationTests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
apply plugin: 'android'
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jan 30 09:58:48 PST 2015
#Thu Mar 15 09:23:14 PDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

0 comments on commit f33d6d6

Please sign in to comment.