Fix artifact publishing.

I keep ammending this commit so it doesn't look like I've been working on
this for the past three hours.
Dieser Commit ist enthalten in:
wizjany 2016-08-06 05:29:56 -04:00
Ursprung b9801ebf57
Commit 98510992eb

Datei anzeigen

@ -27,20 +27,23 @@ buildscript {
dependencies { dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0' classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.3.0'
classpath 'org.ajoberstar:gradle-git:1.4.2' classpath 'org.ajoberstar:gradle-git:1.5.1'
} }
} }
allprojects {
group = 'com.sk89q.worldedit'
version = '6.1.4-SNAPSHOT'
}
if (!project.hasProperty("artifactory_contextUrl")) ext.artifactory_contextUrl = "http://localhost" if (!project.hasProperty("artifactory_contextUrl")) ext.artifactory_contextUrl = "http://localhost"
if (!project.hasProperty("artifactory_user")) ext.artifactory_user = "guest" if (!project.hasProperty("artifactory_user")) ext.artifactory_user = "guest"
if (!project.hasProperty("artifactory_password")) ext.artifactory_password = "" if (!project.hasProperty("artifactory_password")) ext.artifactory_password = ""
if (!project.hasProperty("gitCommitHash") && !JavaVersion.current().isJava6()) { if (!project.hasProperty("gitCommitHash") && !JavaVersion.current().isJava6()) {
try { try {
def Grgit = Class.forName("org.ajoberstar.grgit.Grgit"); def repo = Grgit.open(dir: '.')
def Grgit_open = Grgit.getDeclaredMethod("open", File.class)
def repo = Grgit_open.invoke(null, project.file('.'))
ext.gitCommitHash = repo.head().abbreviatedId ext.gitCommitHash = repo.head().abbreviatedId
} catch (Exception e) { } catch (Exception e) {
println "Error getting commit hash: " + e.getMessage() println "Error getting commit hash: " + e.getMessage()
@ -59,6 +62,7 @@ artifactory {
username = "${artifactory_user}" username = "${artifactory_user}"
password = "${artifactory_password}" password = "${artifactory_password}"
maven = true maven = true
ivy = false
} }
} }
@ -71,6 +75,7 @@ artifactory {
} }
} }
} }
artifactoryPublish.skip = true
subprojects { subprojects {
apply plugin: 'java' apply plugin: 'java'
@ -79,8 +84,6 @@ subprojects {
apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.jfrog.artifactory' apply plugin: 'com.jfrog.artifactory'
group = 'com.sk89q.worldedit'
version = '6.1.4-SNAPSHOT'
ext.internalVersion = version + ";" + gitCommitHash ext.internalVersion = version + ";" + gitCommitHash
sourceCompatibility = 1.7 sourceCompatibility = 1.7
@ -139,4 +142,8 @@ subprojects {
exclude '.cache' exclude '.cache'
exclude 'LICENSE*' exclude 'LICENSE*'
} }
artifactoryPublish {
publishConfigs('archives')
}
} }