diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt index cbc46323ba4..9f448abea6a 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt @@ -152,10 +152,15 @@ class SimpleKotlinGradleIT : BaseGradleIT() { assertSuccessful() val classesDir = File(project.projectDir, "build/classes/main") - val testClass = File(classesDir, "test/Test.class") - assertTrue(testClass.exists()) - checkBytecodeContains(testClass, "public ()V") + fun checkClass(name: String) { + val testClass = File(classesDir, "test/$name.class") + assertTrue(testClass.exists()) + checkBytecodeContains(testClass, "public ()V") + } + + checkClass("Test") + checkClass("Test2") } } } \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/javax/persistence/Embeddable.java b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/javax/persistence/Embeddable.java new file mode 100644 index 00000000000..23b8983461a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/javax/persistence/Embeddable.java @@ -0,0 +1,33 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This file was copied from the javax.persistence : + * https://github.com/eclipse/javax.persistence/blob/master/src/javax/persistence/Entity.java + */ +package javax.persistence; + +import java.lang.annotation.Target; +import java.lang.annotation.Retention; +import java.lang.annotation.Documented; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +@Documented +@Target(TYPE) +@Retention(RUNTIME) +public @interface Embeddable { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/test.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/test.kt index 30fe8f08957..034589a0b6b 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/test.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/test.kt @@ -1,4 +1,7 @@ package test @javax.persistence.Entity -class Test(a: String, b: Int) \ No newline at end of file +class Test(a: String, b: Int) + +@javax.persistence.Embeddable +class Test2(a: String, b: Int) \ No newline at end of file diff --git a/plugins/noarg/noarg-cli/src/NoArgPlugin.kt b/plugins/noarg/noarg-cli/src/NoArgPlugin.kt index cc25f59a5bf..8acaf13d2bd 100644 --- a/plugins/noarg/noarg-cli/src/NoArgPlugin.kt +++ b/plugins/noarg/noarg-cli/src/NoArgPlugin.kt @@ -46,7 +46,7 @@ object NoArgConfigurationKeys { class NoArgCommandLineProcessor : CommandLineProcessor { companion object { - val SUPPORTED_PRESETS = mapOf("jpa" to listOf("javax.persistence.Entity")) + val SUPPORTED_PRESETS = mapOf("jpa" to listOf("javax.persistence.Entity", "javax.persistence.Embeddable")) val ANNOTATION_OPTION = CliOption("annotation", "", "Annotation qualified names", required = false, allowMultipleOccurrences = true)