-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
56 lines (46 loc) · 1.56 KB
/
build.gradle.kts
File metadata and controls
56 lines (46 loc) · 1.56 KB
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
plugins {
id("java-library")
id("objectbox.publishing-conventions")
}
// Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
tasks.withType<JavaCompile> {
options.release.set(8)
}
val junitVersion: String by rootProject.extra
val mockitoVersion: String by rootProject.extra
dependencies {
api(project(":objectbox-java"))
api("io.reactivex.rxjava2:rxjava:2.2.21")
testImplementation("junit:junit:$junitVersion")
testImplementation("org.mockito:mockito-core:$mockitoVersion")
}
val javadocJar by tasks.registering(Jar::class) {
dependsOn(tasks.javadoc)
archiveClassifier.set("javadoc")
from("build/docs/javadoc")
}
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
// Note: common settings applied by objectbox.publishing-conventions plugin
val publicationObjectboxRxjava = "objectboxRxjava"
publishing {
publications {
create<MavenPublication>(publicationObjectboxRxjava) {
artifactId = "objectbox-rxjava"
from(components["java"])
artifact(sourcesJar)
artifact(javadocJar)
pom {
name.set("ObjectBox RxJava API")
description.set("RxJava extension for ObjectBox")
packaging = "jar"
}
}
}
}
signing {
sign(publishing.publications[publicationObjectboxRxjava])
}