Skip to content

Commit

Permalink
Merge pull request #37 from bugsnag/lemnik/release-fixes
Browse files Browse the repository at this point in the history
Release fixes
  • Loading branch information
lemnik authored Oct 15, 2024
2 parents b2dd91f + 6cd8105 commit 48c15c8
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 52 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## TBD
## 0.2.0 (2024-10-09)

### Enhancements

Expand Down
94 changes: 52 additions & 42 deletions bugsnag-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("java-gradle-plugin")
id("org.jetbrains.kotlin.jvm")
id("com.gradle.plugin-publish")
id("maven-publish")
id("signing")
id("com.gradle.plugin-publish")

id("com.github.hierynomus.license")
id("io.gitlab.arturbosch.detekt")
Expand Down Expand Up @@ -58,7 +58,7 @@ gradlePlugin {
plugins {
create("bugsnagPlugin") {
id = "com.bugsnag.gradle"
displayName = project.property("pomName").toString()
displayName = project.property("POM_NAME").toString()
description = project.property("POM_DESCRIPTION").toString()
implementationClass = "com.bugsnag.gradle.GradlePlugin"
tags.set(listOf("bugsnag", "proguard", "android", "upload"))
Expand All @@ -77,62 +77,72 @@ java {
withSourcesJar()
}

project.afterEvaluate {
publishing {
repositories {
maven {
if (project.findProperty("VERSION_NAME")?.toString()?.contains("SNAPSHOT") == true) {
setUrl("https://oss.sonatype.org/content/repositories/snapshots/")
} else {
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
}
publishing {
repositories {
maven {
if (project.findProperty("VERSION_NAME")?.toString()?.contains("SNAPSHOT") == true) {
setUrl("https://oss.sonatype.org/content/repositories/snapshots/")
} else {
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
}

credentials {
username = project.findProperty("NEXUS_USERNAME")?.toString() ?: System.getenv("NEXUS_USERNAME")
password = project.findProperty("NEXUS_PASSWORD")?.toString() ?: System.getenv("NEXUS_PASSWORD")
}
credentials {
username = project.findProperty("NEXUS_USERNAME")?.toString() ?: System.getenv("NEXUS_USERNAME")
password = project.findProperty("NEXUS_PASSWORD")?.toString() ?: System.getenv("NEXUS_PASSWORD")
}
}
}

publications {
publications {
publications {
create("BugsnagGradlePlugin", MavenPublication::class) {
from(components["java"])
groupId = "com.bugsnag"
create<MavenPublication>("BugsnagGradlePlugin") {
from(components["java"])
groupId = "com.bugsnag"
afterEvaluate {
artifactId = project.property("artefactId").toString()
}

pom {
name = project.property("pomName").toString()
description = project.property("POM_DESCRIPTION").toString()
url = project.property("POM_URL").toString()

licenses {
license {
name = project.property("POM_LICENCE_NAME")?.toString()
url = project.property("POM_LICENCE_URL")?.toString()
description = project.property("POM_LICENCE_DIST")?.toString()
}
}
pom {
name = project.property("POM_NAME").toString()
description = project.property("POM_DESCRIPTION").toString()
url = project.property("POM_URL").toString()

developers {
developer {
id = project.property("POM_DEVELOPER_ID")?.toString()
name = project.property("POM_DEVELOPER_NAME")?.toString()
}
licenses {
license {
name = project.property("POM_LICENCE_NAME")?.toString()
url = project.property("POM_LICENCE_URL")?.toString()
description = project.property("POM_LICENCE_DIST")?.toString()
}
}

scm {
connection = project.property("POM_SCM_CONNECTION")?.toString()
developerConnection = project.property("POM_SCM_DEV_CONNECTION")?.toString()
url = project.property("POM_SCM_URL")?.toString()
developers {
developer {
id = project.property("POM_DEVELOPER_ID")?.toString()
name = project.property("POM_DEVELOPER_NAME")?.toString()
}
}

scm {
connection = project.property("POM_SCM_CONNECTION")?.toString()
developerConnection = project.property("POM_SCM_DEV_CONNECTION")?.toString()
url = project.property("POM_SCM_URL")?.toString()
}
}
}
}
}
}

signing {
sign(publishing.publications["BugsnagGradlePlugin"])
}

tasks.named("publishBugsnagGradlePluginPublicationToMavenRepository") {
dependsOn("signPluginMavenPublication")
}

signing {
sign(publishing.publications["BugsnagGradlePlugin"])
afterEvaluate {
tasks.named("publishPluginMavenPublicationToMavenRepository") {
dependsOn("signBugsnagGradlePluginPublication")
}
}
22 changes: 14 additions & 8 deletions bugsnag-gradle-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
pomName=BugSnag Gradle Plugin
artefactId=bugsnag-gradle-plugin

POM_DESCRIPTION=Official BugSnag Gradle Plugin
POM_URL=https://bugsnag.com
POM_NAME=BugSnag Gradle Plugin
POM_ARTIFACT_ID=bugsnag-gradle-plugin
POM_PACKAGING=jar

POM_SCM_URL=https://github.com/bugsnag/bugsnag-gradle-plugin
POM_SCM_CONNECTION=scm:git@github.com:bugsnag/bugsnag-gradle-plugin.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:bugsnag/bugsnag-gradle-plugin.git
POM_URL=https://github.com/bugsnag/bugsnag-gradle-plugin/
POM_SCM_URL=https://github.com/bugsnag/bugsnag-gradle-plugin/
POM_SCM_CONNECTION=scm:git:git://github.com/bugsnag/bugsnag-gradle-plugin.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/bugsnag/bugsnag-gradle-plugin.git
POM_DESCRIPTION=Gradle plugin to automatically upload mapping files to BugSnag.

POM_LICENCE_NAME=MIT
POM_LICENCE_URL=https://opensource.org/licenses/MIT
POM_LICENCE_URL=http://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=BugSnag
POM_DEVELOPER_NAME=BugSnag Developers
POM_DEVELOPER_ID=bugsnag
POM_DEVELOPER_NAME=BugSnag
POM_DEVELOPER_URL=https://bugsnag.com

SONATYPE_STAGING_PROFILE=com.bugsnag
22 changes: 21 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
GROUP=com.bugsnag
VERSION_NAME=0.1.0
VERSION_NAME=0.2.0

POM_NAME=BugSnag Gradle Plugin
POM_ARTIFACT_ID=bugsnag-gradle-plugin
POM_PACKAGING=jar

POM_URL=https://github.com/bugsnag/bugsnag-gradle-plugin/
POM_SCM_URL=https://github.com/bugsnag/bugsnag-gradle-plugin/
POM_SCM_CONNECTION=scm:git:git://github.com/bugsnag/bugsnag-gradle-plugin.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/bugsnag/bugsnag-gradle-plugin.git
POM_DESCRIPTION=Gradle plugin to automatically upload mapping files to BugSnag.

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

0 comments on commit 48c15c8

Please sign in to comment.