forked from objectbox/objectbox-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
79 lines (67 loc) · 2.22 KB
/
Copy pathbuild.gradle
File metadata and controls
79 lines (67 loc) · 2.22 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
buildscript {
ext.javadocDir = "$buildDir/docs/javadoc"
}
apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// Produce Java 8 byte code, would default to Java 6.
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}
dokka {
outputFormat = 'html'
outputDirectory = javadocDir
// Fix "Can't find node by signature": have to manually point to dependencies.
// https://github.com/Kotlin/dokka/wiki/faq#dokka-complains-about-cant-find-node-by-signature-
configuration{
externalDocumentationLink {
// Point to web javadoc for objectbox-java packages.
url = new URL("https://objectbox.io/docfiles/java/current/")
// Note: Using JDK 9+ package-list is now called element-list.
packageListUrl = new URL(url, "element-list")
}
}
}
dependencies {
api project(':objectbox-java')
api 'io.reactivex.rxjava3:rxjava:3.0.1'
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation "junit:junit:$junit_version"
testImplementation "org.mockito:mockito-core:$mockito_version"
}
task javadocJar(type: Jar, dependsOn: dokka) {
archiveClassifier.set('javadoc')
from "$javadocDir"
}
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
// java plugin adds jar.
archives javadocJar
archives sourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
// Basic definitions are defined in root project
pom.project {
name 'ObjectBox RxJava 3 API'
description 'RxJava 3 extensions for ObjectBox'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}
}