Skip to content

Commit e9e8e61

Browse files
authored
Merge pull request #143 from lupuuss/release-3.4.2
Release 3.4.2
2 parents a0ed9af + 19cbfb0 commit e9e8e61

32 files changed

Lines changed: 258 additions & 107 deletions

File tree

build-mokkery/src/main/kotlin/MokkeryAttributes.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
object MokkeryAttributes {
22

3+
const val PluginId = "dev.mokkery"
4+
35
const val GitBase = "github.com/lupuuss/Mokkery"
46
const val GitHttpsUrl = "https://$GitBase"
57
const val GitVscUrl = "${GitHttpsUrl}.git"

build-mokkery/src/main/kotlin/Utils.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import org.jetbrains.kotlin.gradle.tasks.CompilerPluginOptions
1111
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
1212
import java.util.*
1313

14+
@Suppress("UnstableApiUsage")
1415
fun Project.loadLocalProperties() {
15-
val secretPropsFile = rootProject.file("local.properties")
16+
val secretPropsFile = project.isolated.rootProject.projectDirectory.file("local.properties").asFile
1617
if (secretPropsFile.exists()) {
1718
secretPropsFile.reader().use {
1819
Properties().apply {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
3+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4+
5+
val javaVersion = JavaVersion.VERSION_1_8
6+
7+
tasks.withType<JavaCompile>().configureEach {
8+
sourceCompatibility = javaVersion.toString()
9+
targetCompatibility = javaVersion.toString()
10+
}
11+
tasks.withType<KotlinCompile>().configureEach {
12+
compilerOptions {
13+
jvmTarget.set(JvmTarget.fromTarget(javaVersion.toString()))
14+
freeCompilerArgs.add("-Xjdk-release=$javaVersion")
15+
}
16+
}
17+
18+
listOf("org.jetbrains.kotlin.multiplatform", "org.jetbrains.kotlin.jvm").forEach { pluginId ->
19+
plugins.withId(pluginId) {
20+
extensions.getByType<KotlinProjectExtension>().jvmToolchain(17)
21+
}
22+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
plugins {
2+
kotlin("jvm")
3+
id("mokkery-base")
4+
}

build-mokkery/src/main/kotlin/mokkery-multiplatform.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
66

77
plugins {
88
kotlin("multiplatform")
9+
id("mokkery-base")
910
}
1011

1112
kotlin {

build-mokkery/src/main/kotlin/mokkery-publish.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("UnstableApiUsage")
2+
13
import MokkeryAttributes.GitConnectionUrl
24
import MokkeryAttributes.GitDevConnectionUrl
35
import MokkeryAttributes.GitHttpsUrl
@@ -16,7 +18,7 @@ loadLocalProperties()
1618

1719
dokka.dokkaSourceSets.configureEach {
1820
sourceLink {
19-
localDirectory = rootDir
21+
localDirectory = project.isolated.rootProject.projectDirectory.asFile
2022
remoteUrl = URI("${GitHttpsUrl}/tree/master")
2123
remoteLineSuffix ="#L"
2224
}
@@ -25,10 +27,7 @@ dokka.dokkaSourceSets.configureEach {
2527
publishing.repositories {
2628
maven {
2729
name = "testing"
28-
url = rootProject.layout
29-
.buildDirectory
30-
.dir("testing-repository")
31-
.let(::uri)
30+
url = uri(project.isolated.rootProject.projectDirectory.dir("build/testing-repository").asFile)
3231
}
3332
}
3433

build.gradle.kts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11

2-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3-
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
4-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5-
62
plugins {
73
alias(libs.plugins.dokka)
84
}
@@ -22,35 +18,6 @@ buildscript {
2218
}
2319
}
2420

25-
rootProject.group = "dev.mokkery"
26-
27-
rootProject.ext["pluginId"] = "dev.mokkery"
28-
29-
allprojects {
30-
group = rootProject.group
31-
version = rootProject.version
32-
afterEvaluate {
33-
extensions
34-
.findByType<KotlinProjectExtension>()
35-
?.jvmToolchain(17)
36-
val javaVersion = JavaVersion.VERSION_1_8
37-
tasks
38-
.withType<JavaCompile>()
39-
.configureEach {
40-
sourceCompatibility = javaVersion.toString()
41-
targetCompatibility = javaVersion.toString()
42-
}
43-
tasks
44-
.withType<KotlinCompile>()
45-
.configureEach {
46-
compilerOptions {
47-
jvmTarget.set(JvmTarget.fromTarget(javaVersion.toString()))
48-
freeCompilerArgs.add("-Xjdk-release=$javaVersion")
49-
}
50-
}
51-
}
52-
}
53-
5421
dokka {
5522
moduleName.set("Mokkery")
5623
moduleVersion.set(rootProject.version.toString().replace("-SNAPSHOT", "", ignoreCase = true))

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
group=dev.mokkery
2+
version=3.4.2
3+
14
kotlin.code.style=official
25
# atomicfu warnings
36
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
@@ -7,5 +10,3 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
710
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
811
org.gradle.parallel=true
912
kotlin.js.stdlib.dom.api.included=false
10-
version=3.4.1
11-

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildconfig = "5.7.0"
66
google-autoservice = "1.1.1"
77
atomicfu = "0.31.0"
88
dokka = "2.1.0"
9-
poko = "0.23.0"
9+
poko = "0.23.1"
1010
vanniktech-publish-plugin = "0.36.0"
1111
gradle-portal-publish = "2.0.0"
1212

mokkery-core-plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
kotlin("jvm")
2+
id("mokkery-jvm")
33
// no publishing - it's embedded into the plugin
44
}
55

0 commit comments

Comments
 (0)