Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use maven publish plugin for central publishing #256

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sudo: false
env:
global:
- ANDROID_HOME=/usr/local/android-sdk
- ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED=false

android:
components:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
88 changes: 7 additions & 81 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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://[email protected]/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 "[email protected]"
}
}
}
}

// 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 {
fractalwrench marked this conversation as resolved.
Show resolved Hide resolved
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
}
}

Expand Down
2 changes: 1 addition & 1 deletion features/scripts/install_gradle_plugin.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 18 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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://[email protected]/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