build: upload on bintray from travis when a git tag is set and it starts by jmeMainVersion

experimental
David Bernard 9 years ago
parent c39788d4fa
commit 142d7bebae
  1. 3
      .travis.yml
  2. 26
      bintray.gradle
  3. 6
      build.gradle
  4. 2
      common.gradle
  5. 4
      gradle.properties
  6. 6
      version.gradle

@ -54,3 +54,6 @@ before_install:
# wget http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86_64.bin -O ndk.bin # wget http://dl.google.com/android/ndk/android-ndk-r10c-linux-x86_64.bin -O ndk.bin
# 7z x ndk.bin -y > /dev/null # 7z x ndk.bin -y > /dev/null
# export ANDROID_NDK=`pwd`/android-ndk-r10c # export ANDROID_NDK=`pwd`/android-ndk-r10c
after_success:
- '[ -n "$TRAVIS_TAG"" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && ./gradlew bintrayUpload || :'

@ -0,0 +1,26 @@
//
// This file is to be applied to some subproject.
//
apply plugin: 'com.jfrog.bintray'
bintray {
user = bintray_user
key = bintray_api_key
configurations = ['archives']
pkg {
repo = 'org.jmonkeyengine'
userOrg = 'jmonkeyengine'
name = project.name
desc = POM_DESCRIPTION
websiteUrl = POM_URL
licenses = ['BSD New']
vcsUrl = POM_SCM_CONNECTION
labels = ['jmonkeyengine']
}
}
bintrayUpload.onlyIf {
(bintray_api_key.length() > 0) &&
!(version ==~ /.*SNAPSHOT/)
}

@ -2,10 +2,11 @@ import org.gradle.api.artifacts.*
buildscript { buildscript {
repositories { repositories {
mavenCentral() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.1.0' classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
} }
} }
@ -17,6 +18,9 @@ apply from: file('upload.gradle')
subprojects { subprojects {
if(!project.name.equals('jme3-android-examples')) { if(!project.name.equals('jme3-android-examples')) {
apply from: rootProject.file('common.gradle') apply from: rootProject.file('common.gradle')
if (!['jme3-testdata', 'sdk'].contains(project.name)) {
apply from: rootProject.file('bintray.gradle')
}
} else { } else {
apply from: rootProject.file('common-android-app.gradle') apply from: rootProject.file('common-android-app.gradle')
} }

@ -5,7 +5,7 @@
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
group = 'com.jme3' group = 'org.jmonkeyengine'
version = jmePomVersion version = jmePomVersion
sourceCompatibility = '1.6' sourceCompatibility = '1.6'

@ -37,3 +37,7 @@ POM_SCM_DEVELOPER_CONNECTION=scm:git:git@github.com:jMonkeyEngine/jmonkeyengine.
POM_LICENSE_NAME=New BSD (3-clause) License POM_LICENSE_NAME=New BSD (3-clause) License
POM_LICENSE_URL=http://opensource.org/licenses/BSD-3-Clause POM_LICENSE_URL=http://opensource.org/licenses/BSD-3-Clause
POM_LICENSE_DISTRIBUTION=repo POM_LICENSE_DISTRIBUTION=repo
# Bintray settings to override in $HOME/.gradle/gradle.properties or ENV or commandline
bintray_user=
bintray_api_key=

@ -76,7 +76,11 @@ task configureVersionInfo {
jmeFullVersion = jmeMainVersion jmeFullVersion = jmeMainVersion
jmePomVersion = jmeVersion jmePomVersion = jmeVersion
if (jmeBranchName != "master") { if (jmeGitTag.startsWith(jmeMainVersion)) {
jmeVersionTag = ""
jmePomVersion = jmeGitTag
}
if (jmeBranchName != "master" && jmeVersionTag == "SNAPSHOT") {
jmeFullVersion += "-${jmeBranchName}" jmeFullVersion += "-${jmeBranchName}"
jmePomVersion += "-${jmeBranchName}" jmePomVersion += "-${jmeBranchName}"

Loading…
Cancel
Save