-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (92 loc) · 2.69 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
buildscript {
repositories {
jcenter()
}
}
plugins {
id "com.jfrog.bintray" version "1.4"
id 'net.saliman.cobertura' version '2.3.0'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
ext {
statemachineVersion = '0.1.1'
}
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
jacoco {
toolVersion = "0.7.5.201505241946"
}
// Error on travis: "No source file found on the project: statemachine" see:
// https://github.com/kt3k/coveralls-gradle-plugin/issues/32
// https://github.com/ben-manes/caffeine/blob/master/build.gradle
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
tasks.coveralls {
dependsOn 'check'
}
//check.dependsOn jacocoTestReport
cobertura {
coverageSourceDirs = ['src/main/java']
coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.5'
// compile 'org.slf4j:slf4j-api:1.7.13'
compile 'org.slf4j:slf4j-simple:1.7.13'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'org.assertj:assertj-core:3.2.0'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
// See: https://github.com/bintray/bintray-examples/blob/master/gradle-bintray-plugin-examples/configurations-example/build.gradle
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId 'org.nextstate'
artifactId 'statemachine'
version statemachineVersion
artifact sourcesJar
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
// configurations = ['archives']
publications = ['MyPublication']
pkg {
repo = 'maven'
name = 'statemachine'
// userOrg = 'bintray_user'
licenses = ['Apache-2.0']
publish = true
vcsUrl = 'https://github.com/lind/statemachine.git'
version {
name = statemachineVersion
desc = 'Statemachine lib'
// released = new Date()
attributes = ['attr': 'org.nextstate:statemachine']
}
}
}
task wrapper(type: Wrapper, description: "create a gradlew") {
gradleVersion = '2.9'
}