File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
kotlin/kotlinx/validation/test
gradle/configuration/jarAsInput Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2016-2022 JetBrains s.r.o.
3+ * Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
4+ */
5+
6+ package kotlinx.validation.test
7+
8+ import kotlinx.validation.api.*
9+ import org.junit.*
10+
11+ class InputJarTest : BaseKotlinGradleTest () {
12+
13+ @Test
14+ fun testOverrideInputJar () {
15+ val runner = test {
16+ buildGradleKts {
17+ resolve(" examples/gradle/base/withPlugin.gradle.kts" )
18+ resolve(" examples/gradle/configuration/jarAsInput/inputJar.gradle.kts" )
19+ }
20+
21+ kotlin(" Properties.kt" ) {
22+ resolve(" examples/classes/Properties.kt" )
23+ }
24+
25+ apiFile(projectName = rootProjectDir.name) {
26+ resolve(" examples/classes/PropertiesJarTransformed.dump" )
27+ }
28+
29+ runner {
30+ arguments.add(" :apiCheck" )
31+ }
32+ }
33+
34+ runner.build().apply {
35+ assertTaskSuccess(" :jar" )
36+ assertTaskSuccess(" :apiCheck" )
37+ }
38+ }
39+ }
Original file line number Diff line number Diff line change 1+ public final class foo/ClassWithProperties {
2+ public fun <init> ()V
3+ public final fun getBar1 ()I
4+ public final fun getBar2 ()I
5+ public final fun setBar1 (I)V
6+ public final fun setBar2 (I)V
7+ }
8+
Original file line number Diff line number Diff line change 1+ tasks {
2+ jar {
3+ exclude(" foo/HiddenField.class" )
4+ exclude(" foo/HiddenProperty.class" )
5+ }
6+ apiBuild {
7+ inputJar.value(jar.flatMap { it.archiveFile })
8+ }
9+ }
You can’t perform that action at this time.
0 commit comments