Commit a6719ad 1 parent 306dd3f commit a6719ad Copy full SHA for a6719ad
File tree 6 files changed +22
-35
lines changed
6 files changed +22
-35
lines changed Original file line number Diff line number Diff line change 67
67
- name : 3. Build with Kotlin ${{ matrix.kotlin }} and mock-maker ${{ matrix.mock-maker }}
68
68
run : |
69
69
ops/mockMakerInline.sh
70
- ./gradlew build
70
+ ./gradlew build -PtestKotlinVersion=${{ matrix.kotlin }}
71
71
env :
72
- KOTLIN_VERSION : ${{ matrix.kotlin }}
73
72
MOCK_MAKER : ${{ matrix.mock-maker }}
74
73
75
74
#
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ keeping the base module at a recent version.
58
58
59
59
Usually it is enough to test only using the default Kotlin versions;
60
60
CI 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.
63
63
64
64
### Acknowledgements
65
65
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
13
9
}
14
10
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
-
21
11
def test = tasks. register(" test" ) {
22
12
dependsOn gradle. includedBuild(" tests" ). task(" :test" )
23
13
}
Original file line number Diff line number Diff line change 1
1
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
2
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
3
4
- apply plugin : ' kotlin'
4
+ plugins {
5
+ id " org.jetbrains.kotlin.jvm"
6
+ id " org.jetbrains.dokka"
7
+ }
5
8
apply from : ' ../gradle/publishing.gradle'
6
- apply plugin : ' org.jetbrains.dokka'
7
9
8
10
group = ' org.mockito.kotlin'
9
11
Original file line number Diff line number Diff line change 1
1
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
2
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
3
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} "
13
7
}
14
8
15
- apply plugin : ' java'
16
- apply plugin : ' kotlin'
9
+ logger. lifecycle " ${ project} uses Kotlin ${ testKotlinVersion} "
17
10
18
11
repositories {
19
12
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