diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a71ee62..f42e1560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 3.1.0 (2017-90-22) + +### Enhancements + +* Track difference between handled and unhandled exceptions + [#59](https://github.com/bugsnag/bugsnag-java/pull/59) + ## 3.0.2 (04 Jan 2017) ### Bug Fixes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a23eb3eb..d35edb14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,18 +33,27 @@ Create a Sonatype account: 1. Ask an existing contributor (likely Simon) to confirm in the ticket 1. Wait for Sonatype them to confirm the approval +Create a [Bintray](https://bintray.com) account: + +1. Create an account +1. Request access to the Bugsnag organization + ### 2. Configure the prerequisites 1. Create your [PGP Signatures](http://central.sonatype.org/pages/working-with-pgp-signatures.html) 2. Configure your `~/.gradle/gradle.properties`: - ```xml - signing.keyId=your-gpg-key-id (8-character hex) + ```ini + signing.keyId=your-gpg-key-id # (8-character hex) signing.password=your-gpg-password signing.secretKeyRingFile=/PATH/TO/HOME/.gnupg/secring.gpg - - sonatypeUsername=your-sonatype-username - sonatypePassword=your-sonatype-password + + nexusUsername=your-sonatype-username + nexusPassword=your-sonatype-password + + # Your credentials for https://bintray.com + bintray_user=your-bintray-username + bintray_api_key=your-bintray-api-key ``` ### 3. Making a release @@ -53,21 +62,14 @@ Create a Sonatype account: 1. Bump the version number in `Notifier.java` 1. Commit the changes 1. Create a release build: - * `./gradlew --console=plain clean release` + * `./gradlew -Preleasing=true clean release` - enter the release version (e.g. `1.2.0`) - accept the default development version 1. Create a release in GitHub -1. Upload the archives to Sonatype Nexus: - * `git checkout ` - * `./gradlew clean uploadArchives` -1. "Promote" the release build on Maven Central - * Go to the [sonatype open source dashboard](https://oss.sonatype.org/index.html#stagingRepositories) - * Click the search box at the top right, and type “com.bugsnag” - * Select the com.bugsnag staging repository - * Click the “Close” button in the toolbar to prompt the repository to be checked - * Click the “Refresh” button - * Select the com.bugsnag repository (should have a status of 'closed') - * Click the “Release” button in the toolbar +1. Upload the archives to Sonatype Nexus and Bintray: + * `./gradlew -Preleasing=true uploadArchives bintrayUpload` +1. "Promote" the build on Maven Central: + * `./gradlew -Preleasing=true closeAndReleaseRepository` 1. For a major version change, update the version numbers in the integration instructions in the website. 1. Update docs.bugsnag.com with any new content, and bump major version numbers in installation instructions if changed. diff --git a/build.gradle b/build.gradle index 9b68d1df..c3d6e56a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,21 @@ -plugins { - id "java" - id "checkstyle" - id 'net.researchgate.release' version '2.4.0' - id 'maven' - id 'signing' +apply plugin: 'java' +apply plugin: 'checkstyle' +buildscript { + repositories { + jcenter() + } + dependencies { + if (project.hasProperty('releasing')) { + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' + classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' + classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0' + classpath 'net.researchgate:gradle-release:2.4.0' + } + } +} +if (project.hasProperty('releasing')) { + apply from: "release.gradle" } - -archivesBaseName = 'bugsnag' sourceCompatibility = 1.6 targetCompatibility = 1.6 @@ -34,72 +43,3 @@ test { checkstyle { toolVersion = "6.16" } - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from tasks.javadoc.destinationDir -} - -task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives jar - archives javadocJar - archives sourcesJar -} - -signing { - required { gradle.taskGraph.hasTask("uploadArchives") } - sign configurations.archives -} - -release { - tagTemplate = 'v${version}' -} - -// Required to upload releases to Sonatype -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: sonatypeUsername, password: sonatypePassword) - } - - pom.artifactId = 'bugsnag' - pom.groupId = 'com.bugsnag' - - pom.project { - name 'bugsnag' - packaging 'jar' - description 'Official Bugsnag notifier for Java applications' - url 'http://bugsnag.com/' - - scm { - url 'https://github.com/bugsnag/bugsnag-java' - connection 'scm:git:git@github.com:bugsnag/bugsnag-java.git' - developerConnection 'scm:git:git@github.com:bugsnag/bugsnag-java.git' - } - - licenses { - license { - name 'MIT' - url 'http://opensource.org/licenses/MIT' - distribution 'repo' - } - } - - developers { - developer { - id 'james' - name 'James Smith' - } - } - } - } - } -} diff --git a/gradle.properties b/gradle.properties index 84497ab4..21169c6d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,8 @@ -version=3.0.3-SNAPSHOT +version=3.1.0 # Default properties sonatypeUsername= sonatypePassword= +bintray_user= +bintray_password= +bintray_api_key= diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 06ffbb08..14f50990 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip diff --git a/release.gradle b/release.gradle new file mode 100644 index 00000000..6d53eb6d --- /dev/null +++ b/release.gradle @@ -0,0 +1,74 @@ +apply plugin: 'com.jfrog.bintray' +apply plugin: 'com.bmuschko.nexus' +apply plugin: 'io.codearte.nexus-staging' +apply plugin: 'net.researchgate.release' +apply plugin: 'maven-publish' + +archivesBaseName = 'bugsnag' + +release { + tagTemplate = 'v${version}' +} + +modifyPom { + project { + name 'Bugsnag' + description 'Official Bugsnag notifier for Java applications' + url 'https://github.com/bugsnag/bugsnag-java' + + scm { + url 'https://github.com/bugsnag/bugsnag-java' + connection 'scm:git:git://github.com/bugsnag/bugsnag-java.git' + developerConnection 'scm:git:ssh://git@github.com/bugsnag/bugsnag-java.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' + } + } + } +} + +publishing { + publications { + Publication(MavenPublication) { + artifact jar + groupId 'com.bugsnag' + artifactId 'bugsnag' + version project.version + } + } +} +// Bintray upload +bintray { + user = "$bintray_user" + key = "$bintray_api_key" + publications = ['Publication'] + pkg { + repo = 'maven' + name = 'bugsnag-java' + userOrg = 'bugsnag' + licenses = ['MIT'] + vcsUrl = 'https://github.com/bugsnag/bugsnag-java.git' + version { + name = project.version + vcsTag = "v${project.version}" + } + } +} diff --git a/src/main/java/com/bugsnag/Notifier.java b/src/main/java/com/bugsnag/Notifier.java index 440deaed..8ac69774 100644 --- a/src/main/java/com/bugsnag/Notifier.java +++ b/src/main/java/com/bugsnag/Notifier.java @@ -4,7 +4,7 @@ class Notifier { private static final String NOTIFIER_NAME = "Bugsnag Java"; - private static final String NOTIFIER_VERSION = "3.0.2"; + private static final String NOTIFIER_VERSION = "3.1.0"; private static final String NOTIFIER_URL = "https://github.com/bugsnag/bugsnag-java"; @Expose