diff --git a/.travis.yml b/.travis.yml index b2b2e96e..a4128c71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,10 +22,10 @@ before_install: - export ANDROID_HOME=$PWD/android-sdk-linux - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools # install android build tools - - wget https://dl-ssl.google.com/android/repository/build-tools_r21.0.2-linux.zip - - unzip build-tools_r21.0.2-linux.zip -d $ANDROID_HOME + - wget https://dl-ssl.google.com/android/repository/build-tools_r21.1.1-linux.zip + - unzip build-tools_r21.1.1-linux.zip -d $ANDROID_HOME - mkdir -p $ANDROID_HOME/build-tools/ - - mv $ANDROID_HOME/android-5.0 $ANDROID_HOME/build-tools/21.0.2 + - mv $ANDROID_HOME/android-5.0 $ANDROID_HOME/build-tools/21.1.1 # Install required components. # For a full list, run `android list sdk -a --extended` # Note that sysimg-18 downloads the ARM, x86 and MIPS images (we should optimize this). diff --git a/build.gradle b/build.gradle index bcf11205..3c987098 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ allprojects { version = '0.6.0-SNAPSHOT' ext.gdxVersion = "1.4.1" - ext.androidBuildVersionTools = "21.0.2" + ext.androidBuildVersionTools = "21.1.1" repositories { mavenCentral() diff --git a/vtm-android/build.gradle b/vtm-android/build.gradle index ef216190..11137133 100644 --- a/vtm-android/build.gradle +++ b/vtm-android/build.gradle @@ -1,12 +1,17 @@ apply plugin: 'com.android.library' apply plugin: 'android-maven' +configurations { + eclipseCompile +} + dependencies { compile project(':vtm') provided files("${rootDir}/vtm-ext-libs/native-libs.jar") - //compile 'com.android.support:support-v4:21.+' - compile project(':appcompat') + compile 'com.android.support:support-v4:21.+' + + eclipseCompile project(':appcompat') } android { @@ -28,9 +33,18 @@ android { lintOptions.abortOnError false } +task sourcesJar(type: Jar) { + classifier = 'sources' + from android.sourceSets.main.java.srcDirs +} +artifacts { + archives sourcesJar +} + eclipse { classpath { - plusConfigurations += [ configurations.compile, configurations.provided ] + plusConfigurations += [ configurations.compile, configurations.eclipseCompile ] + //noExportConfigurations += [ configurations.provided ] //customizing the classes output directory: @@ -45,16 +59,22 @@ eclipse { // and generated copies beforeMerged { classpath -> // Remove all source entries to avoid overlap - classpath.entries.removeAll() { c -> c.kind == 'src' } + classpath.entries.removeAll() { c -> + c.kind == 'src' + } } // only used to explode jni .so into aar whenMerged { classpath -> - classpath.entries.findAll { entry -> - entry.path.contains('native-libs') || - entry.path.contains('ANDROID_FRAMEWORK') + classpath.entries.findAll { c -> + c.path.contains('native-libs') || + c.path.contains('ANDROID_FRAMEWORK') }*.exported = false + + classpath.entries.removeAll() { c -> + c.path.contains('support') + } } // Direct manipulation of the generated classpath XML diff --git a/vtm-themes/build.gradle b/vtm-themes/build.gradle index 8db1ceb4..abe19065 100644 --- a/vtm-themes/build.gradle +++ b/vtm-themes/build.gradle @@ -10,3 +10,11 @@ sourceSets { main.java.srcDirs = ['src'] main.resources.srcDirs = ['resources'] } + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} +artifacts { + archives sourcesJar +} \ No newline at end of file diff --git a/vtm/build.gradle b/vtm/build.gradle index 9c97561f..19ad73c7 100644 --- a/vtm/build.gradle +++ b/vtm/build.gradle @@ -15,6 +15,14 @@ sourceSets { main.compileClasspath += configurations.providedCompile } +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} +artifacts { + archives sourcesJar +} + eclipse.classpath { //you can tweak the classpath of the Eclipse project by adding extra configurations: plusConfigurations += [ configurations.providedCompile ]