From e9be4a752ff16c395a0702dd63ff458ce8f9252f Mon Sep 17 00:00:00 2001 From: Chuck Greb Date: Wed, 9 Mar 2016 14:48:52 -0500 Subject: [PATCH] Update release deploy script and build properties --- gradle-mvn-push.gradle | 58 ++++++++++++++++------------------- gradle.properties | 14 +++++++++ lost-sample/build.gradle | 4 +-- lost-sample/gradle.properties | 19 ++---------- lost/gradle.properties | 19 ++---------- 5 files changed, 47 insertions(+), 67 deletions(-) create mode 100644 gradle.properties diff --git a/gradle-mvn-push.gradle b/gradle-mvn-push.gradle index 553c77a..1ffad98 100644 --- a/gradle-mvn-push.gradle +++ b/gradle-mvn-push.gradle @@ -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. @@ -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 : "" } @@ -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()) } @@ -81,7 +70,6 @@ afterEvaluate { project -> developer { id POM_DEVELOPER_ID name POM_DEVELOPER_NAME - email POM_DEVELOPER_EMAIL } } } @@ -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 } } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..9601780 --- /dev/null +++ b/gradle.properties @@ -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://git@github.com/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 diff --git a/lost-sample/build.gradle b/lost-sample/build.gradle index 01e4bdc..40a323a 100644 --- a/lost-sample/build.gradle +++ b/lost-sample/build.gradle @@ -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""" diff --git a/lost-sample/gradle.properties b/lost-sample/gradle.properties index fee20f7..b99ce73 100644 --- a/lost-sample/gradle.properties +++ b/lost-sample/gradle.properties @@ -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://git@github.com/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=chuck@mapzen.com +POM_DESCRIPTION=Location Open Source Tracker (LOST) Sample App diff --git a/lost/gradle.properties b/lost/gradle.properties index e5b39fb..a5fd86b 100644 --- a/lost/gradle.properties +++ b/lost/gradle.properties @@ -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://git@github.com/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=chuck@mapzen.com +POM_DESCRIPTION=Location Open Source Tracker (LOST) library for Android