1+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
12import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
23
34apply plugin : ' kotlin'
45apply from : ' ../gradle/publishing.gradle'
56apply plugin : ' org.jetbrains.dokka'
67
78buildscript {
8- ext. kotlin_version = " 1.4 .20"
9+ ext. kotlin_version = " 1.9 .20"
910
1011 repositories {
1112 mavenCentral()
1213 }
1314
1415 dependencies {
1516 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 "
1718 }
1819}
1920
@@ -25,33 +26,35 @@ dependencies {
2526 compileOnly " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
2627 compileOnly ' org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0'
2728
28- compile " org.mockito:mockito-core:5.3.1 "
29+ implementation " org.mockito:mockito-core:5.7.0 "
2930
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'
3233
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'
3637
3738 testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0"
3839}
3940
40- dokka {
41- outputFormat = ' html'
42- outputDirectory = " $buildDir /javadoc"
41+ dokkaHtml. configure {
42+ outputDirectory. set(file(" $buildDir /javadoc" ))
4343
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+ }
4850 }
4951}
5052
5153tasks. withType(KotlinCompile ). configureEach {
52- kotlinOptions {
53- jvmTarget = JavaVersion . VERSION_11
54+ compilerOptions {
55+ jvmTarget. set(JvmTarget . JVM_11 )
56+ targetCompatibility = " 11"
5457 }
5558}
5659
57- javadoc. dependsOn dokka
60+ javadoc. dependsOn dokkaHtml
0 commit comments