diff --git a/.travis.yml b/.travis.yml index 352b6cb2..49f22be7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ sudo: false env: global: - ANDROID_HOME=/usr/local/android-sdk + - ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED=false android: components: diff --git a/Dockerfile b/Dockerfile index 4449abea..1a8ca529 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,6 @@ RUN apt-get install -y git rubygems RUN gem install bundler ADD . bugsnag-android-gradle-plugin -RUN cd bugsnag-android-gradle-plugin && ./gradlew clean build install -PlocalVersion=9000.0.0-test +RUN cd bugsnag-android-gradle-plugin && ./gradlew clean build install -PVERSION_NAME=9000.0.0-test RUN cd bugsnag-android-gradle-plugin/dexguard-test-project && bundle install ADD dexguard-test-project/DexGuard-8.1.15/dexguard-license.txt /root/dexguard-license.txt diff --git a/build.gradle b/build.gradle index a169f88f..5e05c003 100644 --- a/build.gradle +++ b/build.gradle @@ -20,12 +20,10 @@ plugins { id "java-gradle-plugin" id "groovy" id "com.gradle.plugin-publish" version "0.12.0" - id "com.bmuschko.nexus" version "2.3.1" - id "com.jfrog.bintray" version "1.8.5" + id "com.vanniktech.maven.publish" version "0.12.0" } apply plugin: "org.jetbrains.kotlin.jvm" apply plugin: "org.jetbrains.kotlin.kapt" -apply plugin: "maven-publish" apply plugin: "io.gitlab.arturbosch.detekt" allprojects { @@ -81,95 +79,23 @@ dependencies { testImplementation "com.google.truth:truth:1.0.1" } -// Maven publishing settings (nexus-maven-plugins) -modifyPom { - project { - name "Bugsnag Android Gradle Plugin" - description "Gradle plugin to automatically upload ProGuard mapping files to Bugsnag." - url "https://github.com/bugsnag/bugsnag-android-gradle-plugin" - - scm { - url "https://github.com/bugsnag/bugsnag-android-gradle-plugin" - connection "scm:git:git://github.com/bugsnag/bugsnag-android-gradle-plugin.git" - developerConnection "scm:git:ssh://git@github.com/bugsnag/bugsnag-android-gradle-plugin.git" - } - - licenses { - license { - name "MIT" - url "http://opensource.org/licenses/MIT" - distribution "repo" - } - } - - organization { - name "Bugsnag" - url "https://bugsnag.com" - } - - developers { - developer { - id "loopj" - name "James Smith" - email "james@bugsnag.com" - } - } - } -} - // Gradle plugin publishing settings (plugins.gradle.com) pluginBundle { - website = "https://github.com/bugsnag/bugsnag-android-gradle-plugin" - vcsUrl = "https://github.com/bugsnag/bugsnag-android-gradle-plugin.git" + website = POM_URL + vcsUrl = POM_SCM_CONNECTION plugins { androidGradlePlugin { id = "com.bugsnag.android.gradle" - displayName = "Bugsnag Android Gradle Plugin" - description = "Gradle plugin to automatically upload ProGuard mapping files to Bugsnag." + displayName = POM_NAME + description = POM_DESCRIPTION tags = ["bugsnag", "proguard", "android", "upload"] } } mavenCoordinates { - groupId = "com.bugsnag" - artifactId = "bugsnag-android-gradle-plugin" - } -} - -install { - version = project.hasProperty("localVersion") ? project.getProperty("localVersion") : project.version -} - -publishing { - publications { - Publication(MavenPublication) { - artifact jar - groupId "com.bugsnag" - artifactId "bugsnag-android-gradle-plugin" - version project.version - } - } -} - -// Bintray upload -bintray { - user = project.hasProperty("bintray_user") ? "$bintray_user" : System.getenv("bintray_user") - key = project.hasProperty("bintray_api_key") ? "$bintray_api_key" : System.getenv("bintray_api_key") - - publications = ["Publication"] - configurations = ["archives"] - pkg { - repo = "maven" - name = "bugsnag-android-gradle-plugin" - userOrg = "bugsnag" - licenses = ["MIT"] - vcsUrl = "https://github.com/bugsnag/bugsnag-android-gradle-plugin.git" - version { - name = project.version - vcsTag = "v${project.version}" - attributes = ["gradle-plugin": "com.bugsnag.android.gradle"] - } + groupId = GROUP + artifactId = POM_ARTIFACT_ID } } diff --git a/features/scripts/install_gradle_plugin.sh b/features/scripts/install_gradle_plugin.sh index 872aecac..00d47698 100755 --- a/features/scripts/install_gradle_plugin.sh +++ b/features/scripts/install_gradle_plugin.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -./gradlew build install -x groovyDoc -x detekt -x test -PlocalVersion=9000.0.0-test +./gradlew build install -x groovyDoc -x detekt -x test -PVERSION_NAME=9000.0.0-test diff --git a/gradle.properties b/gradle.properties index b199b917..4e7e13a3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,21 @@ -group = com.bugsnag -version = 5.0.0-alpha01 - ANDROID_MIN_SDK_VERSION=14 ANDROID_TARGET_SDK_VERSION=29 ANDROID_COMPILE_SDK_VERSION=29 + +POM_NAME=Bugsnag Android Gradle Plugin +POM_ARTIFACT_ID=bugsnag-android-gradle-plugin +POM_PACKAGING=jar +GROUP=com.bugsnag +VERSION_NAME=5.0.0-SNAPSHOT +POM_DESCRIPTION=Gradle plugin to automatically upload ProGuard mapping files to Bugsnag. +POM_URL=https://github.com/bugsnag/bugsnag-android-gradle-plugin/ +POM_SCM_URL=https://github.com/bugsnag/bugsnag-android-gradle-plugin/ +POM_SCM_CONNECTION=scm:git:git://github.com/bugsnag/bugsnag-android-gradle-plugin.git +POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/bugsnag/bugsnag-android-gradle-plugin.git +POM_LICENCE_NAME=MIT +POM_LICENCE_URL=http://opensource.org/licenses/MIT +POM_LICENCE_DIST=repo +POM_DEVELOPER_ID=bugsnag +POM_DEVELOPER_NAME=Bugsnag +POM_DEVELOPER_URL=https://bugsnag.com +SONATYPE_STAGING_PROFILE=com.bugsnag