Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #48 from mapzen/deploy-release
Browse files Browse the repository at this point in the history
Update release deploy script and build properties
  • Loading branch information
sarahsnow1 committed Mar 9, 2016
2 parents f85008d + e9be4a7 commit cb506cd
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 67 deletions.
58 changes: 27 additions & 31 deletions gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Copyright 2013 Chris Banes
* Copyright 2015 Mapzen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,16 +21,6 @@ def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL :
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL :
"https://oss.sonatype.org/content/repositories/snapshots/"
}

def getRepositoryUsername() {
return hasProperty('sonatypeUsername') ? sonatypeUsername : ""
}
Expand All @@ -50,10 +39,10 @@ afterEvaluate { project ->
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: getReleaseRepositoryUrl()) {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

Expand Down Expand Up @@ -81,7 +70,6 @@ afterEvaluate { project ->
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
email POM_DEVELOPER_EMAIL
}
}
}
Expand All @@ -94,24 +82,32 @@ afterEvaluate { project ->
sign configurations.archives
}

// TODO: Fix javadocs and source jars for release deployment.
// task androidJavadocs(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
// }
//
// task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
// classifier = 'javadoc'
// from androidJavadocs.destinationDir
// }
//
// task androidSourcesJar(type: Jar) {
// classifier = 'sources'
// from android.sourceSets.main.java.sourceFiles
// }
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
exclude '**/*.kt'

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

artifacts {
// archives androidSourcesJar
// archives androidJavadocsJar
archives androidSourcesJar
archives androidJavadocsJar
}
}
14 changes: 14 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GROUP=com.mapzen.android
VERSION_NAME=1.0.2-SNAPSHOT

POM_URL=http://github.com/mapzen/LOST
POM_SCM_URL=http://github.com/mapzen/LOST
POM_SCM_CONNECTION=scm:git:git://github.com/mapzen/LOST.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/mapzen/LOST.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=Mapzen
POM_DEVELOPER_NAME=Mapzen
4 changes: 2 additions & 2 deletions lost-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'checkstyle'

group = 'com.mapzen.android'
version = '1.0.2-SNAPSHOT'
group = GROUP
version = VERSION_NAME

description = """LOST Sample"""

Expand Down
19 changes: 2 additions & 17 deletions lost-sample/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
VERSION_NAME=1.0.2-SNAPSHOT
VERSION_CODE=5
GROUP=com.mapzen.android
POM_ARTIFACT_ID=lost-sample

POM_NAME=LOST Sample
POM_ARTIFACT_ID=lost-sample
POM_PACKAGING=apk

POM_DESCRIPTION=Location Open Source Tracker Sample App
POM_URL=http://github.com/mapzen/LOST
POM_SCM_URL=http://github.com/mapzen/LOST
POM_SCM_CONNECTION=scm:git:git://github.com/mapzen/LOST.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/mapzen/LOST.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=ecgreb
POM_DEVELOPER_NAME=Chuck Greb
POM_DEVELOPER_EMAIL[email protected]
POM_DESCRIPTION=Location Open Source Tracker (LOST) Sample App
19 changes: 2 additions & 17 deletions lost/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
VERSION_NAME=1.0.2-SNAPSHOT
VERSION_CODE=5
GROUP=com.mapzen.android
POM_ARTIFACT_ID=lost

POM_NAME=LOST
POM_ARTIFACT_ID=lost
POM_PACKAGING=aar

POM_DESCRIPTION=Location Open Source Tracker
POM_URL=http://github.com/mapzen/LOST
POM_SCM_URL=http://github.com/mapzen/LOST
POM_SCM_CONNECTION=scm:git:git://github.com/mapzen/LOST.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/mapzen/LOST.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=ecgreb
POM_DEVELOPER_NAME=Chuck Greb
POM_DEVELOPER_EMAIL[email protected]
POM_DESCRIPTION=Location Open Source Tracker (LOST) library for Android

0 comments on commit cb506cd

Please sign in to comment.