2017-04-02 10:06:52 +02:00
|
|
|
plugins {
|
2018-03-24 17:55:59 +01:00
|
|
|
id "com.moowork.node" version "1.2.0"
|
2018-05-20 13:08:06 +02:00
|
|
|
id 'com.github.kt3k.coveralls' version '2.8.2' // Coverage
|
2017-04-02 10:06:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
2018-06-10 21:04:03 +02:00
|
|
|
group 'de.inetsoftware'
|
|
|
|
archivesBaseName = 'jwebassembly-compiler'
|
2018-05-20 12:51:03 +02:00
|
|
|
version = '0.1'
|
|
|
|
|
2017-04-02 10:06:52 +02:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-06-10 21:04:03 +02:00
|
|
|
compile 'de.inetsoftware:jwebassembly-api:+'
|
2017-04-02 10:06:52 +02:00
|
|
|
compile 'com.google.code.findbugs:jsr305:3.0.1'
|
|
|
|
testCompile 'junit:junit:+'
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDir 'src'
|
|
|
|
}
|
|
|
|
resources {
|
|
|
|
srcDir 'src'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
java {
|
|
|
|
srcDir 'test'
|
|
|
|
}
|
|
|
|
resources {
|
|
|
|
srcDir 'test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-10 21:04:03 +02:00
|
|
|
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-02 10:06:52 +02:00
|
|
|
node {
|
2018-03-24 17:55:59 +01:00
|
|
|
version = '8.10.0'
|
|
|
|
// version = '+'
|
|
|
|
// download = true
|
2017-04-02 10:06:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task nodeVersion(type: NodeTask) {
|
|
|
|
test.dependsOn it
|
|
|
|
options = ['-v']
|
|
|
|
script = file('scriptDoesNotExists.js')
|
|
|
|
doLast {
|
2018-03-24 18:23:34 +01:00
|
|
|
if( node.download ) {
|
|
|
|
def nodeDir = nodeSetup.getNodeDir() // dir is only valid if downloaded
|
|
|
|
println nodeDir
|
|
|
|
test.systemProperty 'node.dir', nodeDir
|
|
|
|
}
|
2017-04-02 10:06:52 +02:00
|
|
|
}
|
|
|
|
}
|
2017-04-04 21:30:12 +02:00
|
|
|
|
|
|
|
test {
|
|
|
|
testLogging.showStandardStreams = true
|
|
|
|
testLogging.exceptionFormat = 'full'
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|