File tree Expand file tree Collapse file tree 6 files changed +22
-35
lines changed
Expand file tree Collapse file tree 6 files changed +22
-35
lines changed Original file line number Diff line number Diff line change 6767 - name : 3. Build with Kotlin ${{ matrix.kotlin }} and mock-maker ${{ matrix.mock-maker }}
6868 run : |
6969 ops/mockMakerInline.sh
70- ./gradlew build
70+ ./gradlew build -PtestKotlinVersion=${{ matrix.kotlin }}
7171 env :
72- KOTLIN_VERSION : ${{ matrix.kotlin }}
7372 MOCK_MAKER : ${{ matrix.mock-maker }}
7473
7574 #
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ keeping the base module at a recent version.
5858
5959Usually it is enough to test only using the default Kotlin versions;
6060CI will test against multiple versions.
61- If you want to test using a different Kotlin version locally, set
62- an environment variable ` KOTLIN_VERSION ` and run the tests.
61+ If you want to test using a different Kotlin version locally,
62+ add the ` -PtestKotlinVersion=1.2.3 ` argument to the Gradle invocation while running the tests.
6363
6464### Acknowledgements
6565
Original file line number Diff line number Diff line change 1- buildscript {
2- repositories {
3- mavenLocal() // for local testing
4- maven { url " https://plugins.gradle.org/m2/" }
5- }
6- dependencies {
7- classpath " org.shipkit:shipkit-changelog:1.2.0"
8- classpath " org.shipkit:shipkit-auto-version:1.2.2"
9- classpath " io.github.gradle-nexus:publish-plugin:1.3.0"
10- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
11- classpath " org.jetbrains.dokka:dokka-gradle-plugin:1.9.10"
12- }
1+ plugins {
2+ id " org.gradle.base"
3+ id " org.shipkit.shipkit-changelog" version " 1.2.0"
4+ id " org.shipkit.shipkit-github-release" version " 1.2.0"
5+ id " org.shipkit.shipkit-auto-version" version " 1.2.2"
6+ id " io.github.gradle-nexus.publish-plugin" version " 1.3.0"
7+ id " org.jetbrains.kotlin.jvm" version " 1.9.20" apply false
8+ id " org.jetbrains.dokka" version " 1.9.10" apply false
139}
1410
15- apply plugin : ' org.gradle.base'
16- apply plugin : " io.github.gradle-nexus.publish-plugin"
17- apply plugin : ' org.shipkit.shipkit-auto-version'
18- apply plugin : " org.shipkit.shipkit-changelog"
19- apply plugin : " org.shipkit.shipkit-github-release"
20-
2111def test = tasks. register(" test" ) {
2212 dependsOn gradle. includedBuild(" tests" ). task(" :test" )
2313}
Original file line number Diff line number Diff line change 11import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33
4- apply plugin : ' kotlin'
4+ plugins {
5+ id " org.jetbrains.kotlin.jvm"
6+ id " org.jetbrains.dokka"
7+ }
58apply from : ' ../gradle/publishing.gradle'
6- apply plugin : ' org.jetbrains.dokka'
79
810group = ' org.mockito.kotlin'
911
Original file line number Diff line number Diff line change 11import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33
4- buildscript {
5- repositories {
6- mavenCentral()
7- }
8- dependencies {
9- def kotlin_version = System . getenv(" KOTLIN_VERSION" ) ?: ' 1.9.20'
10- println " $project uses Kotlin $kotlin_version "
11- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
12- }
4+ plugins {
5+ id " org.gradle.java"
6+ id " org.jetbrains.kotlin.jvm" version " ${ testKotlinVersion} "
137}
148
15- apply plugin : ' java'
16- apply plugin : ' kotlin'
9+ logger. lifecycle " ${ project} uses Kotlin ${ testKotlinVersion} "
1710
1811repositories {
1912 mavenCentral()
Original file line number Diff line number Diff line change 1+ # Default version for the :tests module for Kotlin StdLib / KGP.
2+ # See https://github.com/mockito/mockito-kotlin#testing for more.
3+ testKotlinVersion =1.9.20
You can’t perform that action at this time.
0 commit comments