Skip to content

Commit

Permalink
SNAPSHOT builds publish to Sonatype OSSRH, closes opensciencemap#165
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Sep 9, 2016
1 parent 1328d05 commit 801eda4
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ allprojects {
ext.androidBuildVersionTools = "24.0.2"
ext.gdxVersion = "1.9.4"

// Disable Java 8 doclint
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions deploy.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'signing'

if (project.hasProperty("android")) { // Android libraries
if (project.hasProperty("android")) {
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
Expand All @@ -12,7 +12,7 @@ if (project.hasProperty("android")) { // Android libraries
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
exclude 'android-logger.properties'
}
} else { // Java libraries
} else {
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
Expand Down Expand Up @@ -42,6 +42,9 @@ uploadArchives {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD)
}

pom.project {
packaging 'jar'
Expand Down
3 changes: 2 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Graphics API platform enhancements [#92](https://github.com/mapsforge/vtm/issues/92)
- vtm-jts module [#53](https://github.com/mapsforge/vtm/issues/53)
- vtm-http module [#140](https://github.com/mapsforge/vtm/issues/140)
- Internal render themes various enhancements
- Internal render themes various enhancements [#41](https://github.com/mapsforge/mapsforge/issues/41)
- SNAPSHOT builds publish to Sonatype OSSRH [#165](https://github.com/mapsforge/mapsforge/issues/165)
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.6.0)
9 changes: 8 additions & 1 deletion docs/Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,16 @@ The dependencies for Maven are declared in a similar way. For example:
</dependency>
```

## Snapshots

We publish regularly SNAPSHOT builds to Sonatype OSS Repository Hosting. To use `master-SNAPSHOT` version add as repository, e.g. in Gradle:
```groovy
maven { url "https://oss.sonatype.org/content/groups/public/" }
```

## JitPack

We support also [JitPack](https://jitpack.io/#mapsforge/vtm) for publishing. This can be used for the releases, but it's also useful for integrating SNAPSHOT builds in your application (not available in Maven Central).
We support also [JitPack](https://jitpack.io/#mapsforge/vtm) for releases or SNAPSHOT builds.

For example in order to include the `vtm` module `master-SNAPSHOT` with Gradle.

Expand Down
3 changes: 1 addition & 2 deletions vtm-android-gdx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ task run(dependsOn: 'installDebug') {
}
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ android.libraryVariants.all { variant ->
artifacts.add('archives', fatJar);
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ artifacts {
mainClassName = 'org.oscim.gdx.GdxMapApp'
run { ignoreExitValue = true }

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-extras/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ sourceSets {
main.resources.srcDirs = ['src']
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-gdx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ sourceSets {
main.resources.srcDirs = ['src']
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ sourceSets {
main.java.srcDirs = ['src']
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-ios/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ artifacts {
archives fatJar
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-jeo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ sourceSets {
main.resources.srcDirs = ['src']
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-jts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ sourceSets {
main.java.srcDirs = ['src']
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm-themes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ sourceSets {
main.resources.srcDirs = ['resources']
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down
3 changes: 1 addition & 2 deletions vtm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ sourceSets {
main.compileClasspath += configurations.providedCompile
}

// Automated Gradle project deployment to Sonatype OSSRH
if (isReleaseVersion && project.hasProperty("SONATYPE_USERNAME")) {
if (project.hasProperty("SONATYPE_USERNAME")) {
afterEvaluate {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
Expand Down

0 comments on commit 801eda4

Please sign in to comment.