1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
1
2
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
3
3
4
apply plugin : ' kotlin'
4
5
apply from : ' ../gradle/publishing.gradle'
5
6
apply plugin : ' org.jetbrains.dokka'
6
7
7
8
buildscript {
8
- ext. kotlin_version = " 1.4 .20"
9
+ ext. kotlin_version = " 1.9 .20"
9
10
10
11
repositories {
11
12
mavenCentral()
12
13
}
13
14
14
15
dependencies {
15
16
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
16
- classpath " org.jetbrains.dokka:dokka-gradle-plugin:0 .9.17 "
17
+ classpath " org.jetbrains.dokka:dokka-gradle-plugin:1 .9.10 "
17
18
}
18
19
}
19
20
@@ -25,33 +26,35 @@ dependencies {
25
26
compileOnly " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
26
27
compileOnly ' org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0'
27
28
28
- compile " org.mockito:mockito-core:5.3.1 "
29
+ implementation " org.mockito:mockito-core:5.7.0 "
29
30
30
- testCompile ' junit:junit:4.13.2'
31
- testCompile ' com.nhaarman:expect.kt:1.0.1'
31
+ testImplementation ' junit:junit:4.13.2'
32
+ testImplementation ' com.nhaarman:expect.kt:1.0.1'
32
33
33
- testCompile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
34
- testCompile " org.jetbrains.kotlin:kotlin-test:$kotlin_version "
35
- testCompile ' org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'
34
+ testImplementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
35
+ testImplementation " org.jetbrains.kotlin:kotlin-test:$kotlin_version "
36
+ testImplementation ' org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'
36
37
37
38
testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0"
38
39
}
39
40
40
- dokka {
41
- outputFormat = ' html'
42
- outputDirectory = " $buildDir /javadoc"
41
+ dokkaHtml. configure {
42
+ outputDirectory. set(file(" $buildDir /javadoc" ))
43
43
44
- linkMapping {
45
- dir = " src/main/kotlin"
46
- url = " https://github.com/nhaarman/mockito-kotlin/tree/master/mockito-kotlin/src/main/kotlin"
47
- suffix = " #L"
44
+ dokkaSourceSets {
45
+ named(" main" ) {
46
+ localDirectory. set(file(" src/main/kotlin" ))
47
+ remoteUrl. set(new URL (" https://github.com/nhaarman/mockito-kotlin/tree/master/mockito-kotlin/src/main/kotlin" ))
48
+ remoteLineSuffix. set(" #L" )
49
+ }
48
50
}
49
51
}
50
52
51
53
tasks. withType(KotlinCompile ). configureEach {
52
- kotlinOptions {
53
- jvmTarget = JavaVersion . VERSION_11
54
+ compilerOptions {
55
+ jvmTarget. set(JvmTarget . JVM_11 )
56
+ targetCompatibility = " 11"
54
57
}
55
58
}
56
59
57
- javadoc. dependsOn dokka
60
+ javadoc. dependsOn dokkaHtml
0 commit comments