Skip to content

Commit 8ae775b

Browse files
committed
Ensure mr-jar contains new logger class
1 parent 0e2fe7b commit 8ae775b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

okio/build.gradle.kts

+6
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,16 @@ tasks {
228228
options.release = 9
229229
}
230230

231+
val compileJava9KotlinJvm = named<KotlinCompile>("compileJava9KotlinJvm")
232+
231233
named<Jar>("jvmJar") {
232234
from(compileJava9Java.flatMap { it.destinationDirectory }) {
233235
into("META-INF/versions/9")
234236
}
237+
from(compileJava9KotlinJvm.flatMap { it.destinationDirectory }) {
238+
into("META-INF/versions/9")
239+
exclude("META-INF")
240+
}
235241
val bndExtension = BundleTaskExtension(this)
236242
bndExtension.setBnd(
237243
"""

okio/src/jvmIntegrationTest/kotlin/okio/test/integration/ModuleTest.kt

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package okio.test.integration
22

33
import org.junit.Assert.assertFalse
4+
import org.junit.Assert.assertNotNull
45
import org.junit.Assert.assertTrue
56
import org.junit.Test
67

@@ -13,4 +14,10 @@ class ModuleTest {
1314
assertTrue(okioModule.isExported("okio"))
1415
assertFalse(okioModule.isExported("okio.internal"))
1516
}
17+
18+
@Test
19+
fun testLoggerClassIsPresent() {
20+
val logger = Class.forName("okio.internal.Logger")
21+
assertNotNull(logger.getResource("/META-INF/versions/9/okio/internal/Logger.class"))
22+
}
1623
}

0 commit comments

Comments
 (0)