-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
135 lines (94 loc) · 2.95 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.layer:gradle-git-repo-plugin:2.0.2'
}
}
plugins {
id 'java'
//Plugins for code coverage
id "org.sonarqube" version "2.2.1"
id 'jacoco'
//Plugin for having multiple tests
//https://github.com/unbroken-dome/gradle-testsets-plugin
//id 'org.unbroken-dome.test-sets' version '1.1.0'
//Plugin to get git information
//https://github.com/ajoberstar/gradle-git/wiki/release%20plugins%201.x
id "org.ajoberstar.release-opinion" version "1.4.0-rc.1"
id "org.ajoberstar.grgit" version "1.4.0-rc.1"
id "org.ajoberstar.github-pages" version "1.4.0-rc.1"
id "com.jfrog.bintray" version "1.4"
id "maven-publish"
id 'maven'
}
repositories {
mavenCentral()
jcenter()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'simond'
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
dependencies {
//compile 'commons-lang:commons-lang:2.6'
//compile 'net.sourceforge.jtransforms:jtransforms:2.4.0'
compile 'org.slf4j:slf4j-api:1.7.2' // Logging library.
runtime 'ch.qos.logback:logback-classic:1.0.9' // Logging library.
testCompile 'junit:junit:4.7'
}
//Release task configuration
// Usage of the release task : ./gradlew release -Prelease.scope=major -Prelease.stage=final
// stage being one of : milestone rc final
// scope : major, minor, patch
import org.ajoberstar.grgit.*
release {
// need to specify the repository to interact with
grgit = Grgit.open(project.file('.'))
}
// Add depends on other tasks in the release task
tasks.release.dependsOn 'build' //, 'publishToMyRepo'
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = project.name
websiteUrl = "https://github.com/simonduf/data"
vcsUrl = "https://github.com/simonduf/data"
licenses = ["LGPL-2.1"]
userOrg = project.group
publish = true
version {
name = project.version
//desc = 'simple interface for having node with input and output'
released = new Date().format("EEE MMM dd HH:mm:ss zzz yyyy")
vcsTag = "v" + project.version
//attributes = []
}
}
}
//task tagRelease << {
// repo.tag.add {
// name = version
// message = "Release of ${version}"
//}