-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
87 lines (74 loc) · 2.19 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.breadmoirai:github-release:2.2.11"
}
}
plugins {
id "org.sonarqube" version "4.0.0.2929"
}
apply plugin: "com.github.breadmoirai.github-release"
apply plugin: 'java'
apply plugin: "jacoco"
apply plugin: 'eclipse'
version = '0.4.0'
repositories {
mavenCentral()
maven { url 'https://nexus.onebusaway.org/nexus/content/repositories/public/' }
}
ext {
github_token = System.getenv('GITHUB_TOKEN')
}
//create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'mapsplit fat jar',
'Implementation-Version': "${project.version}",
'Main-Class': 'dev.osm.mapsplit.MapSplit'
}
archiveBaseName = project.name + '-all'
from { configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
fatJar.group = 'build'
jacocoTestReport {
reports {
xml.required=true
}
}
sonarqube {
properties {
property "sonar.java.source","1.8"
property "sonar.sourceEncoding","UTF-8"
property "sonar.java.binaries", "build/classes/java/main/"
property "sonar.coverage.jacoco.xmlReportPaths","build/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.qualitygate.wait", "true"
}
}
test{
maxHeapSize = "6G"
}
dependencies {
implementation 'org.openstreetmap.osmosis:osmosis-core:0.47'
implementation 'org.openstreetmap.osmosis:osmosis-pbf:0.47'
implementation 'com.google.protobuf:protobuf-java:3.7.1'
implementation 'commons-cli:commons-cli:1.4'
implementation 'ch.poole.geo:mbtiles4j:1.2.0'
implementation 'org.jetbrains:annotations:15.0'
implementation 'com.zaxxer:SparseBitSet:1.1'
testImplementation 'junit:junit:4.12'
}
githubRelease {
token "${github_token}"
owner "simonpoole"
tagName "${version}"
releaseName "${version}"
body ""
FilenameFilter filter = { dir, filename -> filename.contains(version) }
releaseAssets = new File(buildDir.getPath() + '/libs').listFiles filter
overwrite true
}