forked from arrow-kt/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add deploy * minor improvement * bad indent * missing method * delete gradle from modules * fix missing module * increase decoding from raw threshold
- Loading branch information
1 parent
5025045
commit b895f92
Showing
20 changed files
with
166 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
gradle-mvn-push.gradle#!/usr/bin/env bash | ||
. $(dirname $0)/deploy_common.sh | ||
|
||
echo "Branch '$TRAVIS_BRANCH'" | ||
|
||
if [ "$TRAVIS_BRANCH" == "master" ]; then | ||
if [[ "$VERSION_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
echo "Starting script for Release $VERSION_NAME" | ||
. $(dirname $0)/deploy_release.sh | ||
elif [[ "$VERSION_NAME" == *-SNAPSHOT ]]; then | ||
echo "Starting script for Snapshot Release $VERSION_NAME" | ||
. $(dirname $0)/deploy_snapshot.sh | ||
else | ||
echo "No deploy script matched version '$VERSION_NAME' on master" | ||
fi | ||
else | ||
echo "Skipped deployment in branch '$TRAVIS_BRANCH'" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
. $(dirname $0)/deploy_functions.sh | ||
set -e | ||
|
||
SLUG="47deg/hood" | ||
JDK="oraclejdk8" | ||
BRANCH="master" | ||
VERSION_NAME=$(getProperty "VERSION_NAME") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
function getProperty { | ||
PROP_KEY=$1 | ||
PROP_VALUE=`cat gradle.properties | grep "$PROP_KEY" | cut -d'=' -f2` | ||
echo $PROP_VALUE | ||
} | ||
|
||
function fail { | ||
echo "$1" | ||
exit -1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
. $(dirname $0)/deploy_common.sh | ||
|
||
VERSION_PATTERN=^[0-9]+\.[0-9]+\.[0-9]+$ | ||
|
||
echo "Deploying release '$VERSION_NAME' ..." | ||
|
||
if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then | ||
fail "Failed release deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'." | ||
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then | ||
fail "Failed release deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'." | ||
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
fail "Failed release deployment: was pull request." | ||
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then | ||
fail "Failed release deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." | ||
elif ! [[ "$VERSION_NAME" =~ $VERSION_PATTERN ]]; then | ||
fail "Failed release deployment: wrong version. Expected '$VERSION_NAME' to have pattern 'X.Y.Z'" | ||
else | ||
./gradlew bintrayUpload | ||
echo "Release '$VERSION_NAME' deployed!" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
. $(dirname $0)/deploy_common.sh | ||
|
||
VERSION_PATTERN=^[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT$ | ||
|
||
echo "Deploying snapshot '$VERSION_NAME' ..." | ||
|
||
if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then | ||
fail "Failed snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'." | ||
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then | ||
fail "Failed snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'." | ||
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
fail "Failed snapshot deployment: was pull request." | ||
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then | ||
fail "Failed snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." | ||
elif ! [[ "$VERSION_NAME" =~ $VERSION_PATTERN ]]; then | ||
echo "Skipping snapshot deployment '$VERSION_NAME': This is probably a pre-release build" | ||
else | ||
./gradlew bintrayUpload | ||
echo "Snapshot '$VERSION_NAME' deployed!" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,82 @@ | ||
apply plugin: 'maven' | ||
|
||
version = VERSION_NAME | ||
group = GROUP | ||
|
||
def findProperty(String key) { | ||
[project.properties[key], System.getenv(key)].find { it != null } | ||
} | ||
|
||
def getReleaseRepositoryUrl() { | ||
return findProperty('RELEASE_REPOSITORY_URL') ?: "https://api.bintray.com/maven/com.47deg/helios/" + POM_ARTIFACT_ID | ||
return findProperty("RELEASE_REPOSITORY_URL") ?: "https://api.bintray.com/maven/47deg/helios/helios" | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
return findProperty('SNAPSHOT_REPOSITORY_URL') ?: "https://oss.jfrog.org/artifactory/oss-snapshot-local" | ||
return findProperty("SNAPSHOT_REPOSITORY_URL") ?: "https://oss.jfrog.org/artifactory/oss-snapshot-local" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return findProperty('BINTRAY_USER') ?: "no.bintray.user" | ||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
archiveClassifier = "sources" | ||
from sourceSets.main.allSource, | ||
"build/generated/source/kapt/main", | ||
"build/generated/source/kapt/debug", | ||
"build/generated/source/kapt/release", | ||
"build/generated/source/kaptKotlin/main", | ||
"build/generated/source/kaptKotlin/debug", | ||
"build/generated/source/kaptKotlin/release", | ||
"build/tmp/kapt/main/kotlinGenerated" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return findProperty('BINTRAY_API_KEY') ?: "no.bintray.api.key" | ||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier = "javadoc" | ||
from javadoc.destinationDir | ||
} | ||
|
||
uploadArchives { | ||
repositories.mavenDeployer { | ||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
repository(url: getReleaseRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
publishing { | ||
publications { | ||
HeliosPublication(MavenPublication) { | ||
|
||
artifactId = POM_ARTIFACT_ID | ||
groupId = group | ||
version = version | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
from components.java | ||
pom { | ||
name = POM_NAME | ||
packaging = POM_PACKAGING | ||
description = POM_DESCRIPTION | ||
url = POM_URL | ||
scm { | ||
url = POM_SCM_URL | ||
connection = POM_SCM_CONNECTION | ||
developerConnection = POM_SCM_DEV_CONNECTION | ||
} | ||
snapshotRepository(url: getSnapshotRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
licenses { | ||
license { | ||
name = POM_LICENCE_NAME | ||
url = POM_LICENCE_URL | ||
distribution = POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = POM_DEVELOPER_ID | ||
name = POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
def releasesRepoUrl = getReleaseRepositoryUrl() | ||
def snapshotsRepoUrl = getSnapshotRepositoryUrl() | ||
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
getArchiveClassifier().set('sources') | ||
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
getArchiveClassifier().set('javadoc') | ||
from javadoc.destinationDir | ||
} | ||
} | ||
|
||
if (JavaVersion.current().isJava8Compatible()) { | ||
allprojects { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
allprojects { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption("Xdoclint:none", "-quiet") | ||
} | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Maven publishing configuration | ||
POM_NAME=Helios Core | ||
POM_ARTIFACT_ID=helios-core | ||
POM_NAME=Helios Benchmarks | ||
POM_ARTIFACT_ID=helios-benchmarks | ||
POM_PACKAGING=jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.