JWebAssembly/build.gradle

158 lines
4.3 KiB
Groovy
Raw Normal View History

plugins {
2018-05-20 13:08:06 +02:00
id 'com.github.kt3k.coveralls' version '2.8.2' // Coverage
2018-08-24 18:11:39 +02:00
id "com.jfrog.bintray" version "1.8.4"
}
2018-08-24 18:11:39 +02:00
apply plugin: 'java-library'
apply plugin: 'maven-publish'
group 'de.inetsoftware'
archivesBaseName = 'jwebassembly-compiler'
2020-04-27 21:00:44 +02:00
version = '0.3'
2018-05-20 12:51:03 +02:00
repositories {
jcenter()
2019-02-23 21:56:11 +01:00
maven { url 'https://jitpack.io' } // for snapshot of the API
}
dependencies {
// "compileOnly" will not add as dependency. this is different to "compile".
2018-08-24 18:11:39 +02:00
compileOnly 'com.google.code.findbugs:jsr305:3.0.1'
//compileOnly 'de.inetsoftware:jwebassembly-api:+'
compileOnly 'com.github.i-net-software:jwebassembly-api:master-SNAPSHOT'
2018-11-11 11:22:37 +01:00
testCompile 'com.google.code.findbugs:jsr305:3.0.1'
2019-02-23 21:56:11 +01:00
//testCompile 'de.inetsoftware:jwebassembly-api:+'
testCompile 'com.github.i-net-software:jwebassembly-api:master-SNAPSHOT'
testCompile 'junit:junit:+'
2019-02-12 21:16:34 +01:00
testCompile 'org.apache.commons:commons-compress:1.2'
testCompile 'com.google.code.gson:gson:+'
}
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'src'
}
}
test {
java {
srcDir 'test'
}
resources {
srcDir 'test'
}
}
}
2020-03-15 16:02:12 +01:00
compileJava.options.encoding = 'UTF-8'
2020-05-24 13:59:13 +02:00
compileJava.options.compilerArgs << '-Xlint:all'
2020-03-15 16:02:12 +01:00
compileTestJava.options.encoding = 'UTF-8'
2020-05-24 13:59:13 +02:00
compileTestJava.options.compilerArgs << '-Xlint:all'
2020-03-15 16:02:12 +01:00
javadoc.options.encoding = 'UTF-8'
2019-02-28 21:27:10 +01:00
jar {
manifest {
attributes( 'Implementation-Title': 'JWebAssembly-API',
'Implementation-Vendor': 'i-net software',
'Implementation-Version': version)
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.java
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
build {
dependsOn sourcesJar
dependsOn javadocJar
}
artifacts {
archives sourcesJar
archives javadocJar
}
2017-04-04 21:30:12 +02:00
test {
systemProperty "file.encoding", "UTF-8"
2019-01-20 11:31:12 +01:00
testLogging {
showStandardStreams = true
showStackTraces = true
exceptionFormat = 'full'
events 'passed', 'skipped', 'failed'
}
2017-04-04 21:30:12 +02:00
}
2018-05-20 12:51:03 +02:00
/****************************************
* Coverage
****************************************/
apply plugin: 'jacoco'
jacocoTestReport {
tasks.coveralls.dependsOn it
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
check.dependsOn tasks.coveralls
2018-08-24 18:11:39 +02:00
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()
}
}
}
}