-
Notifications
You must be signed in to change notification settings - Fork 306
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
47 lines (40 loc) · 1.29 KB
/
build.gradle.kts
File metadata and controls
47 lines (40 loc) · 1.29 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
plugins {
id("java-library")
id("objectbox-publish")
}
// 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)
}
// Set project-specific properties.
publishing {
publications {
getByName<MavenPublication>("mavenJava") {
from(components["java"])
artifact(sourcesJar)
artifact(javadocJar)
pom {
name.set("ObjectBox RxJava API")
description.set("RxJava extension for ObjectBox")
}
}
}
}