diff --git a/.travis.yml b/.travis.yml index 0e1cb26..31bf4ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,17 @@ -# Use docker-based build environment (instead of openvz) -sudo: false - language: java -jdk: - - oraclejdk8 -script: gradle check + +deploy: + # deploy to Github + provider: releases + api_key: + secure: SJ3TuoiZf5y3RCHJCkNrrbD4zkvBYhgZwBvRaq1lh7N0RjKfdcO9yD6OMwleCyu/5Ecvt8jRCJOgEDLNb5+IuaLmlnAoPhsgKCbybSm7HhvS4p7BrP0xHniuGazHPF/qbu0Kcs/sWHciJM/Ti/wxmmStVqIkEkcpOUiY84L3iJ5vgsKh7sU88rTf+BkjtUZ98QN7YI9/NnSLmvDuR6PheeIgGZwOCXhFjENpxyfpxhF5QQzwgOSJIqM7uIntsehuiZrcCF5kT7OZEVjkzI+cxD1dlrE3S6ZF2MFuGmjHlkCw/+Wibtjz34Ta2LqOLOYLHr2tkjGBDoFnzv/xqouQXVZHLyBfdhLzcQdFrYap9qGit0OPh1PsdCUo+AdBwHZNDWASMHiL+QkNZA4VSLPMMnL2mktd8QwGGhbBNt2AwXNje+bsESVeWwUsooXgAKgHzzcXcfxmf0yGZNc8eLb1h60QWYMDWSs30DsOJshmtzOqVJ0tAVZVNPMsVqL19lP+Qb22i3ZRlSEEiD/1UqX7qJuZ7a5lYQX7HvjoVkPBRNCxKAUEMfFDf9km07pAXsMSp8hSRbmwexLMuhQiWaCyGX1G3iTTq5xrBxdwwS/CG0zhyqSYuLJ1LP5N4Uh5ff+EK4s7ZiT4eY7F8WOa6fpx0yvihhc5CIUYpEwkqjVN+I4= + file_glob: true + file: "./build/libs/jwebassembly-compiler-*.jar" + skip_cleanup: true + overwrite: true + on: + repo: i-net-software/JWebAssembly + tags: true + +after_deploy: + - gradle bintrayUpload diff --git a/build.gradle b/build.gradle index 4675850..b636d50 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,11 @@ plugins { id "com.moowork.node" version "1.2.0" id 'com.github.kt3k.coveralls' version '2.8.2' // Coverage + id "com.jfrog.bintray" version "1.8.4" } -apply plugin: 'java' +apply plugin: 'java-library' +apply plugin: 'maven-publish' group 'de.inetsoftware' archivesBaseName = 'jwebassembly-compiler' @@ -14,8 +16,8 @@ repositories { } dependencies { - compile 'de.inetsoftware:jwebassembly-api:+' - compile 'com.google.code.findbugs:jsr305:3.0.1' + compileOnly 'com.google.code.findbugs:jsr305:3.0.1' + testCompile 'de.inetsoftware:jwebassembly-api:+' testCompile 'junit:junit:+' } @@ -97,3 +99,51 @@ jacocoTestReport { } check.dependsOn tasks.coveralls +bintray { + user = System.getenv('BINTRAY_USER') + key = System.getenv('BINTRAY_KEY') + publications = ['JWebAssemblyPublication'] + publish = true + override = true + pkg { + repo = 'OSS' + userOrg = 'i-net-software' + licenses = ['Apache-2.0'] + vcsUrl = 'https://github.com/i-net-software' + name = group + '.' + archivesBaseName + version { + released = new Date() + } + } +} + +publishing { + publications { + JWebAssemblyPublication(MavenPublication) { + from components.java + artifact sourcesJar + artifact javadocJar + artifactId archivesBaseName + pom.withXml { + def root = asNode() + root.appendNode('name', 'JWebAssembly-Compiler') + root.appendNode('description', 'A Java to WebAssembly compiler.') + root.appendNode('url', 'https://github.com/i-net-software/JWebAssembly') + + def node = root.appendNode('developers').appendNode( 'developer' ) + node.appendNode( 'id', 'Horcrux7' ) + node.appendNode( 'name', 'Volker Berlin' ) + node.appendNode( 'email', 'vberlin@inetsoftware.de' ) + node.appendNode( 'organization', 'i-net software' ) + node.appendNode( 'organizationUrl', 'https://www.inetsoftware.de' ) + + node = root.appendNode('scm') + node.appendNode( 'connection', 'scm:git:git@github.com:i-net-software/JWebAssembly.git' ) + node.appendNode( 'developerConnection', 'scm:git:git@github.com:i-net-software/JWebAssembly.git' ) + node.appendNode( 'url', 'https://github.com/i-net-software/JWebAssembly' ) + + root.children().last() + } + } + } +}