Update Gradle and Android, build improvements. Closes #1

This commit is contained in:
Emux 2016-06-16 13:04:00 +03:00
parent adc04ace7f
commit 9022ec14ec
8 changed files with 26 additions and 19 deletions

View File

@ -11,11 +11,11 @@ buildscript {
dependencies { dependencies {
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.3' classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.3'
classpath 'com.android.tools.build:gradle:1.0.1' classpath 'com.android.tools.build:gradle:2.1.2'
// for aar/maven stuff // for aar/maven stuff
// https://github.com/dcendents/android-maven-plugin // https://github.com/dcendents/android-maven-gradle-plugin
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }
@ -23,10 +23,6 @@ def filterProjects(filter) {
return subprojects.findAll { project -> filter.contains(project.name) } return subprojects.findAll { project -> filter.contains(project.name) }
} }
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
//apply from:'jdee.gradle' //apply from:'jdee.gradle'
allprojects { allprojects {
@ -34,7 +30,7 @@ allprojects {
version = '0.6.0-SNAPSHOT' version = '0.6.0-SNAPSHOT'
ext.gdxVersion = "1.4.1" ext.gdxVersion = "1.4.1"
ext.androidBuildVersionTools = "22" ext.androidBuildVersionTools = "23.0.3"
repositories { repositories {
maven { url 'https://github.com/hjanetzek/maven-repo/raw/master/' } maven { url 'https://github.com/hjanetzek/maven-repo/raw/master/' }
@ -51,7 +47,7 @@ allprojects {
} }
def androidMinSdk() { return 10 } def androidMinSdk() { return 10 }
def androidTargetSdk() { return 21 } def androidTargetSdk() { return 23 }
def versionCode() { return 50 } def versionCode() { return 50 }
def versionName() { return version } def versionName() { return version }

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Thu Mar 19 13:11:24 CET 2015 #Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

10
gradlew vendored
View File

@ -42,11 +42,6 @@ case "`uname`" in
;; ;;
esac esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" PRG="$0"
@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi fi
done done
SAVED="`pwd`" SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&- cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`" APP_HOME="`pwd -P`"
cd "$SAVED" >&- cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@ -114,6 +109,7 @@ fi
if $cygwin ; then if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"` APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath # We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`

View File

@ -1,3 +1,4 @@
rootProject.name = 'vtm-parent'
include ':appcompat' include ':appcompat'
include ':vtm' include ':vtm'
include ':vtm-tests' include ':vtm-tests'

View File

@ -10,6 +10,7 @@ dependencies {
compile project(':vtm-jeo') compile project(':vtm-jeo')
compile project(':vtm-extras') compile project(':vtm-extras')
compile project(':vtm-themes') compile project(':vtm-themes')
compile files("${rootDir}/vtm-ext-libs/native-libs.jar")
compile 'com.android.support:support-v4:22.+' compile 'com.android.support:support-v4:22.+'
compile 'com.android.support:appcompat-v7:22.+' compile 'com.android.support:appcompat-v7:22.+'

View File

@ -8,6 +8,7 @@ configurations {
dependencies { dependencies {
compile project(':vtm-android') compile project(':vtm-android')
compile project(':vtm-themes') compile project(':vtm-themes')
compile files("${rootDir}/vtm-ext-libs/native-libs.jar")
compile 'com.android.support:support-v4:22.+' compile 'com.android.support:support-v4:22.+'
compile 'com.android.support:appcompat-v7:22.+' compile 'com.android.support:appcompat-v7:22.+'

View File

@ -1,5 +1,5 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'android-maven' apply plugin: 'com.github.dcendents.android-maven'
configurations { configurations {
eclipseCompile eclipseCompile
@ -98,3 +98,15 @@ eclipse {
locationUri: 'PARENT-1-PROJECT_LOC/vtm-ext-libs/vtm-android' locationUri: 'PARENT-1-PROJECT_LOC/vtm-ext-libs/vtm-android'
} }
} }
android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (name.equals("debug")) {
print "Skipping debug jar"
return; // Skip debug builds.
}
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
artifacts.add('archives', task);
}