diff --git a/CHANGELOG.md b/CHANGELOG.md index a99b68c..b55b736 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +# v 0.6.6 +- Fix missing library dependencies on generated pom. + # v 0.6.5 - Update kotlin 1.2.10 - Add missing proguard setup. diff --git a/bintray.gradle b/bintray.gradle index 4f95a59..ff82d7e 100644 --- a/bintray.gradle +++ b/bintray.gradle @@ -83,6 +83,38 @@ def getRepositoryPassword() { return hasProperty('BINTRAY_PASSWORD') ? getVariableOrEmpty("BINTRAY_PASSWORD") : "" } +def pomProperties = { + packaging "aar" + groupId = GROUP + artifactId = POM_ARTIFACT_ID + version = VERSION_NAME + name POM_NAME + description POM_DESCRIPTION + url POM_URL + + scm { + url POM_SCM_URL + connection POM_SCM_CONNECTION + developerConnection POM_SCM_DEV_CONNECTION + } + + licenses { + license { + name POM_LICENCE_NAME + url POM_LICENCE_URL + distribution POM_LICENCE_DIST + } + } + + developers { + developer { + id POM_DEVELOPER_ID + name POM_DEVELOPER_NAME + email POM_DEVELOPER_EMAIL + } + } +} + afterEvaluate { project -> uploadArchives { repositories { @@ -96,111 +128,68 @@ afterEvaluate { project -> authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) } - pom.project { - packaging "aar" - groupId = GROUP - artifactId = POM_ARTIFACT_ID - version = VERSION_NAME - name POM_NAME - description POM_DESCRIPTION - url POM_URL - - scm { - url POM_SCM_URL - connection POM_SCM_CONNECTION - developerConnection POM_SCM_DEV_CONNECTION - } - - licenses { - license { - name POM_LICENCE_NAME - url POM_LICENCE_URL - distribution POM_LICENCE_DIST - } - } - - developers { - developer { - id POM_DEVELOPER_ID - name POM_DEVELOPER_NAME - email POM_DEVELOPER_EMAIL - } - } - } + pom.project(pomProperties) } } } +} - signing { - required { isReleaseBuild() && project.hasProperty("signPackage") } - sign configurations.archives - } +signing { + required { isReleaseBuild() && project.hasProperty("signPackage") } + sign configurations.archives +} - task install(type: Upload, dependsOn: assemble) { - repositories.mavenInstaller { - configuration = configurations.archives +task install(type: Upload, dependsOn: assemble) { + repositories.mavenInstaller { + configuration = configurations.archives - pom.groupId = GROUP - pom.artifactId = POM_ARTIFACT_ID - pom.version = VERSION_NAME + pom.groupId = GROUP + pom.artifactId = POM_ARTIFACT_ID + pom.version = VERSION_NAME - pom.project { - name POM_NAME - packaging "aar" - description POM_DESCRIPTION - url POM_URL + pom.project(pomProperties) - scm { - url POM_SCM_URL - connection POM_SCM_CONNECTION - developerConnection POM_SCM_DEV_CONNECTION - } + // Append library dependencies to the pom + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') - licenses { - license { - name POM_LICENCE_NAME - url POM_LICENCE_URL - distribution POM_LICENCE_DIST - } - } + configurations.compile.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') - developers { - developer { - id POM_DEVELOPER_ID - name POM_DEVELOPER_NAME - } - } + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) } } } +} - task androidJavadocs(type: Javadoc) { - source = android.sourceSets.main.kotlin.source - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - } +task androidJavadocs(type: Javadoc) { + source = android.sourceSets.main.kotlin.source + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) +} - task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'javadoc' - from androidJavadocs.destinationDir - } +task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { + classifier = 'javadoc' + from androidJavadocs.destinationDir +} - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.source - } +task androidSourcesJar(type: Jar) { + classifier = 'sources' + from android.sourceSets.main.java.source +} - if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } +if (JavaVersion.current().isJava8Compatible()) { + allprojects { + tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') } } +} - artifacts { - archives androidSourcesJar - archives androidJavadocsJar - } +artifacts { + archives androidSourcesJar + archives androidJavadocsJar } bintray { diff --git a/lib/gradle.properties b/lib/gradle.properties index 10be867..db9b23e 100644 --- a/lib/gradle.properties +++ b/lib/gradle.properties @@ -1,5 +1,5 @@ -VERSION_NAME=0.6.5 -VERSION_CODE=31 +VERSION_NAME=0.6.6 +VERSION_CODE=32 GROUP=com.baristav.debugartist POM_NAME=Debug Artist diff --git a/reporter-pivotal/gradle.properties b/reporter-pivotal/gradle.properties index 852bed7..cb172b7 100644 --- a/reporter-pivotal/gradle.properties +++ b/reporter-pivotal/gradle.properties @@ -1,5 +1,5 @@ -VERSION_NAME=0.6.5 -VERSION_CODE=6 +VERSION_NAME=0.6.6 +VERSION_CODE=7 GROUP=com.baristav.debugartist POM_NAME=Debug Artist - Pivotal Tracker reporter diff --git a/sample/build.gradle b/sample/build.gradle index df00f85..924ae8b 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -29,8 +29,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'rules.pro' - buildConfigField "String", "PIVOTAL_API_KEY", "\"${getVariableOrEmpty("DA_PIVOTAL_API_KEY")}\"" - buildConfigField "String", "PIVOTAL_PROJECT_ID", "\"${getVariableOrEmpty("DA_PIVOTAL_PROJECT_ID")}\"" + buildConfigField "String", "PIVOTAL_API_KEY", + "\"${getVariableOrEmpty("DA_PIVOTAL_API_KEY")}\"" + buildConfigField "String", "PIVOTAL_PROJECT_ID", + "\"${getVariableOrEmpty("DA_PIVOTAL_PROJECT_ID")}\"" } release { minifyEnabled true @@ -69,8 +71,8 @@ def sampleVersions = [retrofit: "2.2.0", dependencies { compile libraries.appCompat - compile project(':lib') - compile project(':reporter-pivotal') + compile(project(':lib')) { transitive = true } + compile(project(':reporter-pivotal')) { transitive = true } // For StethoActivity compile 'com.facebook.stetho:stetho-okhttp3:1.5.0'