Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
made it work
Browse files Browse the repository at this point in the history
  • Loading branch information
tmohay committed Sep 13, 2019
1 parent 49d967c commit 637e8e1
Showing 1 changed file with 46 additions and 27 deletions.
73 changes: 46 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ subprojects {

task testSupportJar(type: Jar) {
baseName = "${project.name}-support-test"
classifier = 'test-support'
from sourceSets.testSupport.output
}

Expand All @@ -310,52 +309,72 @@ subprojects {
return result
}

def pomData = {
name = "Pantheon - ${project.name}"
url = 'http://github.com/PegaSysEng/pantheon'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
connection = 'scm:git:git://github.com/PegaSysEng/pantheon.git'
developerConnection = 'scm:git:ssh://github.com/PegaSysEng/pantheon.git'
url = 'https://github.com/PegaSysEng/pantheon'
}
}

def versionMappingData = {
usage('java-api') { fromResolutionOf('runtimeClasspath') }
usage('java-runtime') { fromResolutionResult() }
}

def projectPublications = []

if(sourceSetIsPopulated("main") || sourceSetIsPopulated("testSupport")) {
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'

publishing {
publications {
mavenJava(MavenPublication) {
groupId "tech.pegasys.pantheon.internal"
version "${project.version}"
if(sourceSetIsPopulated("main")) {
if(sourceSetIsPopulated("main")) {
mavenJava(MavenPublication) {
groupId "tech.pegasys.pantheon.internal"
version "${project.version}"
from components.java
artifact sourcesJar
artifact javadocJar
versionMapping versionMappingData
pom pomData
}

if(sourceSetIsPopulated("testSupport")) {
projectPublications.add("mavenJava")
}
if(sourceSetIsPopulated("testSupport")) {
testSupport(MavenPublication) {
groupId "tech.pegasys.pantheon.internal.testsupport"
version "${project.version}"
artifact testSupportJar
versionMapping versionMappingData
pom pomData
}
versionMapping {
usage('java-api') { fromResolutionOf('runtimeClasspath') }
usage('java-runtime') { fromResolutionResult() }
}
pom {
name = "Pantheon - ${project.name}"
url = 'http://github.com/PegaSysEng/pantheon'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
connection = 'scm:git:git://github.com/PegaSysEng/pantheon.git'
developerConnection = 'scm:git:ssh://github.com/PegaSysEng/pantheon.git'
url = 'https://github.com/PegaSysEng/pantheon'
}
}
projectPublications.add("testSupport")
}
}
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url = "/Users/tmm/project/repo"
}
}

}

bintray {
user = bintrayUser
key = bintrayKey

publications = ['mavenJava']
publications = projectPublications
override = version.endsWith('SNAPSHOT')

publish = true
Expand Down

0 comments on commit 637e8e1

Please sign in to comment.