Skip to content

Commit

Permalink
Deploy releases to bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jul 10, 2017
1 parent a8bf3a6 commit 974bd3a
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 34 deletions.
27 changes: 14 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ before_install:
- docker run -v $(pwd)/src/main/resources/zoneinfo:/zoneinfo -it benfortuna/tzurl rsync -av --delete /usr/local/apache2/htdocs/zoneinfo /
- docker run -v $(pwd)/src/main/resources/zoneinfo-global:/zoneinfo-global -it benfortuna/tzurl rsync -av --delete /usr/local/apache2/htdocs/zoneinfo-global /
script:
- ./gradlew check jacocoTestReport
- ./gradlew build jacocoTestReport
after_success:
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: releases
api_key:
secure: DpTp3xxZrKP21I13G8dYY5EBra5tcf9TsF1y9oLRdOSoVvUe0XaOQ+9WPG2RgnuH1DPVj1n2Rr6emAZ84lSzz4H7T8gPYP4pLjmJBGyriGC7N3MTG2FCBn5l6DgTKNLxtfpek/b7nClif6vVTEse/T8/9an/Yszp9bbIZNNwStE=
file:
- build/distributions/ical4j-$TRAVIS_TAG.zip
- build/distributions/ical4j-$TRAVIS_TAG.tgz
skip_cleanup: true
on:
tags: true
jdk: openjdk7
before_deploy: "./gradlew assembleMainDist"
- "[[ $TRAVIS_BRANCH =~ ^release ]] && ./gradlew release bintrayUpload"
#deploy:
# provider: releases
# api_key:
# secure: DpTp3xxZrKP21I13G8dYY5EBra5tcf9TsF1y9oLRdOSoVvUe0XaOQ+9WPG2RgnuH1DPVj1n2Rr6emAZ84lSzz4H7T8gPYP4pLjmJBGyriGC7N3MTG2FCBn5l6DgTKNLxtfpek/b7nClif6vVTEse/T8/9an/Yszp9bbIZNNwStE=
# file:
# - build/distributions/ical4j-$TRAVIS_TAG.zip
# - build/distributions/ical4j-$TRAVIS_TAG.tgz
# skip_cleanup: true
# on:
# tags: true
# jdk: openjdk7
#before_deploy: "./gradlew assembleMainDist"
addons:
hostname: travis-ci
after_script:
Expand Down
85 changes: 64 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,40 @@ buildscript {
}

dependencies {
classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '1.4.0'
classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '1.7.1'
classpath 'org.hidetake:gradle-ssh-plugin:1.1.3'
}
}

plugins {
id "nebula.provided-base" version "3.0.3"
id "nebula.provided-base" version "3.0.3"
id "com.jfrog.bintray" version "1.7.3"
}

apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'groovy'
apply plugin: 'osgi'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'signing'
apply plugin: 'pl.allegro.tech.build.axion-release'
apply plugin: 'nebula.optional-base'
apply from: 'gradle/dist.gradle'

group = 'org.mnode.ical4j'
description = '''
A Java library for reading and writing iCalendar (*.ics) files
'''

sourceCompatibility = 1.7
targetCompatibility = 1.7

ext {
slf4jVersion = '1.7.10'
}

/*
githubPages {
// repoUri = 'https://github.com/ical4j/ical4j.github.io.git'
Expand Down Expand Up @@ -57,23 +69,22 @@ repositories {
mavenCentral()
}

ext {
slf4jVersion = '1.7.10'
}

dependencies {
compile "org.slf4j:slf4j-api:$slf4jVersion",
'commons-codec:commons-codec:1.9',
'org.apache.commons:commons-lang3:3.3.2',
'org.apache.commons:commons-collections4:4.0',
'org.threeten:threetenbp:1.3.3'
api "org.slf4j:slf4j-api:$slf4jVersion",
'commons-codec:commons-codec:1.9',
'org.apache.commons:commons-lang3:3.3.2',
'org.apache.commons:commons-collections4:4.0',
'org.threeten:threetenbp:1.3.3'

compile 'org.codehaus.groovy:groovy-all:2.3.2', optional
compile 'biz.aQute.bnd:bndlib:2.3.0', optional

testCompile 'org.spockframework:spock-core:0.7-groovy-2.0',
'commons-io:commons-io:2.4',
'org.ccil.cowan.tagsoup:tagsoup:1.2.1',
"org.slf4j:slf4j-log4j12:$slf4jVersion"
compileOnly 'biz.aQute.bnd:bndlib:2.3.0'

testImplementation 'org.codehaus.groovy:groovy-all:2.3.2',
'org.spockframework:spock-core:0.7-groovy-2.0',
'commons-io:commons-io:2.4',
'org.ccil.cowan.tagsoup:tagsoup:1.2.1',
"org.slf4j:slf4j-log4j12:$slf4jVersion"
}

jacocoTestReport {
Expand Down Expand Up @@ -125,12 +136,7 @@ scmVersion {
'release/.*': 'simple'
]
}

group = 'org.mnode.ical4j'
version = scmVersion.version
description = '''
A Java library for reading and writing iCalendar (*.ics) files
'''

ext {
isReleaseVersion = !version.endsWith("SNAPSHOT")
Expand Down Expand Up @@ -178,3 +184,40 @@ uploadArchives {
}
}
}

publishing {
publications {
mavenArtifacts(MavenPublication) {
from components.java
}
}
}

bintray {
user = bintray_user
key = bintray_key
pkg {
repo = 'maven'
name = 'ical4j'
userOrg = 'ical4j'
licenses = ['BSD']
vcsUrl = 'https://github.com/ical4j/ical4j.git'
version {
name = scmVersion.version
desc = "iCal4j $scmVersion.version"
released = new Date()
vcsTag = "ical4j-$scmVersion.version"
gpg {
sign = isReleaseVersion
}
// mavenCentralSync {
// sync = isReleaseVersion
// user = 'userToken' //OSS user token: mandatory
// password = 'paasword' //OSS user password: mandatory
// close = '0' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
// }
}
}
// configurations = ['archives']
publications = ['mavenArtifacts']
}

0 comments on commit 974bd3a

Please sign in to comment.