Skip to content

Commit e395a11

Browse files
committed
Module file check for JVM
1 parent 4d3ea47 commit e395a11

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

integration-testing/examples/jvm-sample/build.gradle.kts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ buildscript {
1010
}
1111
}
1212

13+
group = "kotlinx.atomicfu.examples"
14+
version = "DUMMY_VERSION"
15+
1316
plugins {
1417
kotlin("jvm") version "${project.properties["kotlin_version"]}"
18+
`maven-publish`
1519
}
1620

1721
apply(plugin = "kotlinx-atomicfu")
@@ -26,3 +30,23 @@ dependencies {
2630
implementation(kotlin("stdlib"))
2731
implementation(kotlin("test-junit"))
2832
}
33+
34+
publishing {
35+
repositories {
36+
/**
37+
* Maven repository in build directory to store artifacts for using in functional tests.
38+
*/
39+
maven("build/.m2/") {
40+
name = "local"
41+
}
42+
}
43+
44+
publications {
45+
create<MavenPublication>("maven") {
46+
groupId = "kotlinx.atomicfu.examples"
47+
artifactId = "jvm-sample"
48+
49+
from(components["kotlin"])
50+
}
51+
}
52+
}

integration-testing/src/functionalTest/kotlin/kotlinx.atomicfu.gradle.plugin.test/cases/JvmProjectTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ class JvmProjectTest {
1616
fun testJvmWithEnabledIrTransformation() {
1717
jvmSample.enableJvmIrTransformation = true
1818
jvmSample.checkJvmCompileOnlyDependencies()
19+
jvmSample.checkCosumableDependencies()
1920
jvmSample.buildAndCheckBytecode()
2021
}
2122

2223
@Test
2324
fun testJvmWithDisabledIrTransformation() {
2425
jvmSample.enableJvmIrTransformation = false
2526
jvmSample.checkJvmCompileOnlyDependencies()
27+
jvmSample.checkCosumableDependencies()
2628
jvmSample.buildAndCheckBytecode()
2729
}
2830
}

0 commit comments

Comments
 (0)