Skip to content

Commit

Permalink
prepare 2.0.1 release (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaunchDarklyCI authored Jan 31, 2020
1 parent ec49d7e commit 762ba11
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .ldrelease/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ publications:

template:
name: gradle

documentation:
githubPages: true
7 changes: 7 additions & 0 deletions .ldrelease/publish-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -ue

# Publish to Github Pages
echo "Publishing to Github Pages"
./gradlew gitPublishPush
7 changes: 7 additions & 0 deletions .ldrelease/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -ue

# Publish to Sonatype
echo "Publishing to Sonatype"
./gradlew publishToSonatype closeAndReleaseRepository || { echo "Gradle publish/release failed" >&2; exit 1; }
65 changes: 40 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'idea'
apply plugin: 'io.codearte.nexus-staging'

buildscript {
repositories {
mavenCentral()
mavenLocal()
}
}

plugins {
id "java"
id "java-library"
id "signing"
id "maven-publish"
id "de.marcphilipp.nexus-publish" version "0.3.0"
id "io.codearte.nexus-staging" version "0.21.2"
id "org.ajoberstar.git-publish" version "2.1.3"
id "idea"
}

repositories {
mavenLocal()
Expand All @@ -28,7 +41,7 @@ dependencies {
}

task wrapper(type: Wrapper) {
gradleVersion = '2.14-rc-3'
gradleVersion = '4.10.2'
}

jar {
Expand All @@ -38,16 +51,6 @@ jar {
}
}

buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.8.0"
}
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
Expand Down Expand Up @@ -75,15 +78,17 @@ idea {

nexusStaging {
packageGroup = "com.launchdarkly"
numberOfRetries = 40 // we've seen extremely long delays in closing repositories
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

groupId = 'com.launchdarkly'
artifactId = 'okhttp-eventsource'

artifact jar
artifact sourcesJar
artifact javadocJar

Expand Down Expand Up @@ -113,18 +118,28 @@ publishing {
}
repositories {
mavenLocal()
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ossrhUsername
password ossrhPassword
}
}
}

nexusPublishing {
clientTimeout = java.time.Duration.ofMinutes(2) // we've seen extremely long delays in creating repositories
repositories {
sonatype {
username = ossrhUsername
password = ossrhPassword
}
}
}

signing {
sign publishing.publications.mavenJava
}

gitPublish {
repoUri = 'git@github.com:launchdarkly/okhttp-eventsource.git'
branch = 'gh-pages'
contents {
from javadoc
}
commitMessage = 'publishing javadocs'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Aug 01 14:20:02 PDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
26 changes: 17 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down

0 comments on commit 762ba11

Please sign in to comment.