-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
92 lines (76 loc) · 2.26 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
plugins {
id "com.jfrog.bintray" version "1.8.4"
id "org.sonarqube" version "2.7"
}
/* Java basics */
apply plugin: 'java'
group = 'com.asteroid.duck'
version = '0.0.8'
description = 'Utility classes for working with Apache Jena'
sourceCompatibility = 1.8
// workaround for sonarqube plugin issue in Gradle 4
//sourceSets.main.output.classesDir = new File(buildDir, "classes/main")
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.30'
compile 'org.apache.jena:jena-core:3.17.0'
compile 'org.apache.jena:jena-arq:3.17.0'
testCompile 'junit:junit:4.+'
testCompile 'org.mockito:mockito-all:1.10.19'
testRuntime 'ch.qos.logback:logback-classic:1.2.3'
}
/* Add ability to publish JARs to Maven (e.g. bintray) */
apply plugin: 'maven-publish'
/** Create a source JAR for maven */
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
options
{
setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true
source "8"
links "https://docs.oracle.com/javase/8/docs/api/", "https://jena.apache.org/documentation/javadoc/jena/"
}
}
task packageJavadoc(type: Jar) {
from javadoc
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
artifact packageJavadoc {
classifier "javadoc"
}
}
}
}
/* Configuration to publish from travis to bintray */
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mavenJava'] // reference above publication
publish = true // Whether version should be auto published after an upload
override = true // Whether to override version artifacts already published
pkg {
name = 'jena-utils' // < - EDIT ME
repo = 'maven'
userOrg = 'duck-asteroid'
licenses = ['MIT']
vcsUrl = 'https://github.com/duckAsteroid/jena-utils.git' // < - EDIT ME
version {
name = project.version
released = new Date()
}
}
}