mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
156 lines
3.9 KiB
Groovy
156 lines
3.9 KiB
Groovy
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-library'
|
|
apply plugin: 'maven-publish'
|
|
|
|
group 'de.inetsoftware'
|
|
archivesBaseName = 'jwebassembly-compiler'
|
|
version = '0.1'
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly 'com.google.code.findbugs:jsr305:3.0.1'
|
|
testCompile 'com.google.code.findbugs:jsr305:3.0.1'
|
|
testCompile 'de.inetsoftware:jwebassembly-api:+'
|
|
testCompile 'junit:junit:+'
|
|
testCompile 'org.apache.commons:commons-compress:1.2'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir 'src'
|
|
}
|
|
resources {
|
|
srcDir 'src'
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDir 'test'
|
|
}
|
|
resources {
|
|
srcDir 'test'
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
node {
|
|
version = '10.8.0'
|
|
// version = '+'
|
|
download = true
|
|
}
|
|
|
|
task nodeVersion(type: NodeTask) {
|
|
test.dependsOn it
|
|
options = ['-v']
|
|
script = file('scriptDoesNotExists.js')
|
|
doLast {
|
|
if( node.download ) {
|
|
def nodeDir = nodeSetup.getNodeDir() // dir is only valid if downloaded
|
|
println nodeDir
|
|
test.systemProperty 'node.dir', nodeDir
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
showStandardStreams = true
|
|
showStackTraces = true
|
|
exceptionFormat = 'full'
|
|
events 'passed', 'skipped', 'failed'
|
|
}
|
|
}
|
|
|
|
|
|
/****************************************
|
|
* 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
|
|
|
|
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()
|
|
}
|
|
}
|
|
}
|
|
}
|