Skip to content

Commit

Permalink
Merge branch 'master' of github.com:xenon-middleware/xenon
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaassen committed Jun 19, 2019
2 parents 6ba4c3a + 09979df commit 9053314
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 17 deletions.
11 changes: 4 additions & 7 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,14 @@ To add the release to bintray, do the following:
```bash
export BINTRAY_USER=<your bintray username>
export BINTRAY_KEY=<your bintray API key>
./gradlew bintrayUpload
./gradlew publishToBintray
```

This should create the new release on bintray and upload all necessary data, jars, etc.

Next, go to the bintray page:

https://bintray.com/nlesc/xenon/xenon#

and click on 'publish' to publish the release. The latest verion tag usually takes a few minutes to update.
On https://bintray.com/nlesc/xenon check that xenon* packages have been updated.

The latest version tag usually takes a few minutes to update.

### Alternative manual bintray step

Expand Down Expand Up @@ -118,6 +115,6 @@ the .m2 repository. Click on `save` and then on `publish` to publish the version

### 7. Update applications using Xenon.

Update related repros such as Xenon-examples, pyXenon, xenon-cli, etc
Update related repos such as Xenon-examples, pyXenon, xenon-cli, etc

And finally celebrate.
101 changes: 96 additions & 5 deletions gradle/distribution.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,43 @@
// ==============
task sourcesJar(type: Jar, dependsOn: classes) {
description "Creates jar file of Java sources"
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
description "Creates jar file of javadoc"
classifier = 'javadoc'
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

task testApiJar(type: Jar) {
description "Creates jar with test api"
baseName = 'xenon-testapi'
archiveBaseName = 'xenon-testapi'
from sourceSets.testApi.output
}

task testApiSourceJar(type: Jar, dependsOn: classes) {
description "Creates jar file of testapi Java sources"
archiveBaseName = 'xenon-testapi'
archiveClassifier = 'sources'
from sourceSets.testApi.allSource
}

task docGeneratorJar(type: Jar) {
description "Creates jar with doc generator"
baseName = 'xenon-docgenerator'
archiveBaseName = 'xenon-docgenerator'
from sourceSets.docGenerator.output
}

task docGeneratorSourceJar(type: Jar, dependsOn: classes) {
description "Creates jar with doc generator Java sources"
archiveBaseName = 'xenon-docgenerator'
archiveClassifier = 'sources'
from sourceSets.docGenerator.allSource
}


artifacts {
archives sourcesJar
archives javadocJar
Expand Down Expand Up @@ -87,13 +102,71 @@ publishing {
version version

artifact testApiJar
artifact testApiSourceJar

pom {
url = "https://xenon-middleware.github.io/xenon"
description = "Abstract classes for Xenon adaptor integration tests"
url = "https://github.com/xenon-middleware/xenon"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
connection = "scm:git:https://github.com/xenon-middleware/xenon.git"
url = "https://github.com/xenon-middleware/xenon"
}
}
// Add dependencies.testApiCompile to publication
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.testApiCompile.allDependencies.each {
if (it.group) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
// Xenon is added as sourceSets.main.output, which cannot be resolved to a dependency, so add manually
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', 'nl.esciencecenter.xenon')
dependencyNode.appendNode('artifactId', 'xenon')
dependencyNode.appendNode('version', version)
}
}
DocGeneratorPublication(MavenPublication) {
groupId 'nl.esciencecenter.xenon'
artifactId 'xenon-docgenerator'
version version

artifact docGeneratorJar
artifact docGeneratorSourceJar
pom {
url = "https://xenon-middleware.github.io/xenon"
description = "Class to generate documentation for all Xenon adaptors in class path"
url = "https://github.com/xenon-middleware/xenon"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
connection = "scm:git:https://github.com/xenon-middleware/xenon.git"
url = "https://github.com/xenon-middleware/xenon"
}
}
// Add dependencies.testApiCompile to publication
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
// Xenon is added as sourceSets.main.output, which cannot be resolved to a dependency, so add manually
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', 'nl.esciencecenter.xenon')
dependencyNode.appendNode('artifactId', 'xenon')
dependencyNode.appendNode('version', version)
}
}
LiveTestPublication(MavenPublication) {
groupId 'nl.esciencecenter.xenon'
Expand All @@ -103,4 +176,22 @@ publishing {
artifact liveTestJar
}
}
repositories {
maven {
name = 'TestApiRepo'
url = 'https://api.bintray.com/maven/nlesc/xenon/xenon-testapi/;publish=1'
credentials {
username = System.getenv('BINTRAY_USER')
password = System.getenv('BINTRAY_KEY')
}
}
maven {
name = 'DocGeneratorRepo'
url = 'https://api.bintray.com/maven/nlesc/xenon/xenon-docgenerator/;publish=1'
credentials {
username = System.getenv('BINTRAY_USER')
password = System.getenv('BINTRAY_KEY')
}
}
}
}
15 changes: 11 additions & 4 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publish = true
pkg {
repo = 'xenon'
name = 'xenon'
Expand All @@ -19,7 +20,7 @@ bintray {
vcsUrl = 'https://github.com/NLeSC/Xenon.git'
issueTrackerUrl = 'https://github.com/NLeSC/Xenon/issues'
}
publications = ['MyPublication', 'TestApiPublication', 'DocGeneratorPublication']
publications = ['MyPublication']
}

tasks.publish.dependsOn 'bintrayUpload'
Expand Down Expand Up @@ -49,7 +50,13 @@ task copyJavadoc(type: Copy) {
}

task publishSite() {
description 'Publishes artifacts to site (aka /docs/ directory)'
group 'Publishing'
dependsOn 'versionSite', 'copyJavadoc'
description 'Publishes artifacts to site (aka /docs/ directory)'
group 'Publishing'
dependsOn 'versionSite', 'copyJavadoc'
}

task publishToBintray() {
dependsOn 'bintrayUpload',
'publishDocGeneratorPublicationPublicationToDocGeneratorRepoRepository',
'publishTestApiPublicationPublicationToTestApiRepoRepository'
}
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Jun 13 16:52:12 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 comments on commit 9053314

Please sign in to comment.