diff --git a/backend/api/build.gradle b/backend/api/build.gradle index 5ddf9edff9..616044f7b3 100644 --- a/backend/api/build.gradle +++ b/backend/api/build.gradle @@ -3,18 +3,12 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' } group = 'io.tolgee' -allOpen { - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.boot.test.context.SpringBootTest") -} - dependencies { implementation libs.kotlinCoroutines implementation 'org.springframework.boot:spring-boot-starter-web' diff --git a/backend/app/build.gradle b/backend/app/build.gradle index f311b5375c..372c4a407c 100644 --- a/backend/app/build.gradle +++ b/backend/app/build.gradle @@ -3,7 +3,6 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' id 'io.tolgee.gradle.hibernate' @@ -18,18 +17,6 @@ configurations { } } -allOpen { - annotation("javax.persistence.Entity") - annotation("javax.persistence.MappedSuperclass") - annotation("javax.persistence.Embeddable") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.transaction.annotation.Transactional") - annotation("org.springframework.beans.factory.annotation.Configurable") - annotation("org.springframework.boot.test.context.SpringBootTest") -} - dependencies { /** * SPRING diff --git a/backend/data/build.gradle b/backend/data/build.gradle index ee0b82fca8..66ea81dbdf 100644 --- a/backend/data/build.gradle +++ b/backend/data/build.gradle @@ -3,7 +3,6 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' id 'io.tolgee.gradle.hibernate' @@ -20,12 +19,6 @@ configurations { ktlint } -idea { - module { - generatedSourceDirs += files('build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main') - } -} - hibernate { enhance { enableLazyInitialization = true @@ -35,16 +28,6 @@ hibernate { } } -allOpen { - annotation("javax.persistence.Entity") - annotation("javax.persistence.MappedSuperclass") - annotation("javax.persistence.Embeddable") - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.transaction.annotation.Transactional") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.beans.factory.annotation.Configurable") -} - //configureLiquibase("public", "hibernate:spring:io.tolgee", 'src/main/resources/db/changelog/schema.xml') diff.dependsOn compileKotlin diff --git a/backend/development/build.gradle b/backend/development/build.gradle index 7c5e8d304e..b68d75937f 100644 --- a/backend/development/build.gradle +++ b/backend/development/build.gradle @@ -3,7 +3,6 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' id 'io.tolgee.gradle.hibernate' @@ -19,22 +18,6 @@ configurations { ktlint } -idea { - module { - generatedSourceDirs += files('build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main') - } -} - -allOpen { - annotation("javax.persistence.Entity") - annotation("javax.persistence.MappedSuperclass") - annotation("javax.persistence.Embeddable") - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.transaction.annotation.Transactional") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.beans.factory.annotation.Configurable") -} - dependencies { /** * SPRING diff --git a/backend/misc/build.gradle b/backend/misc/build.gradle index 367e731b8d..fe6e388d73 100644 --- a/backend/misc/build.gradle +++ b/backend/misc/build.gradle @@ -3,7 +3,6 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' } diff --git a/backend/security/build.gradle b/backend/security/build.gradle index dd183cd4d8..789cd72a66 100644 --- a/backend/security/build.gradle +++ b/backend/security/build.gradle @@ -3,18 +3,12 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' } group = 'io.tolgee.security' -allOpen { - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.boot.test.context.SpringBootTest") -} - dependencies { implementation libs.kotlinCoroutines implementation 'org.springframework.boot:spring-boot-starter-web' diff --git a/backend/testing/build.gradle b/backend/testing/build.gradle index 9697b947ef..1fcdebb7b9 100644 --- a/backend/testing/build.gradle +++ b/backend/testing/build.gradle @@ -3,7 +3,6 @@ */ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' id 'io.tolgee.gradle.hibernate' @@ -19,22 +18,6 @@ configurations { ktlint } -idea { - module { - generatedSourceDirs += files('build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main') - } -} - -allOpen { - annotation("javax.persistence.Entity") - annotation("javax.persistence.MappedSuperclass") - annotation("javax.persistence.Embeddable") - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.transaction.annotation.Transactional") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.beans.factory.annotation.Configurable") -} - dependencies { /** * SPRING diff --git a/buildSrc/src/main/kotlin/io/tolgee/gradle/base.gradle.kts b/buildSrc/src/main/kotlin/io/tolgee/gradle/base.gradle.kts index b7dc8a5852..d8f43d5d4f 100644 --- a/buildSrc/src/main/kotlin/io/tolgee/gradle/base.gradle.kts +++ b/buildSrc/src/main/kotlin/io/tolgee/gradle/base.gradle.kts @@ -12,9 +12,9 @@ repositories { maven(url = "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") } -apply(plugin = "java") -apply(plugin = "idea") -apply(plugin = "eclipse") +//apply(plugin = "java") +//apply(plugin = "idea") +//apply(plugin = "eclipse") if (System.getenv().containsKey("VERSION")) { project.version = System.getenv().get("VERSION") as String diff --git a/buildSrc/src/main/kotlin/io/tolgee/gradle/hibernate.gradle.kts b/buildSrc/src/main/kotlin/io/tolgee/gradle/hibernate.gradle.kts index 12a8646f1b..8522f45c47 100644 --- a/buildSrc/src/main/kotlin/io/tolgee/gradle/hibernate.gradle.kts +++ b/buildSrc/src/main/kotlin/io/tolgee/gradle/hibernate.gradle.kts @@ -1,9 +1,17 @@ package io.tolgee.gradle plugins { + id("base") + id("kotlin") id("org.jetbrains.kotlin.plugin.jpa") id("org.hibernate.orm") } -apply(plugin = "org.jetbrains.kotlin.plugin.jpa") -apply(plugin = "org.hibernate.orm") +//apply(plugin = "org.jetbrains.kotlin.plugin.jpa") +//apply(plugin = "org.hibernate.orm") + +configure { + annotation("javax.persistence.Entity") + annotation("javax.persistence.MappedSuperclass") + annotation("javax.persistence.Embeddable") +} diff --git a/buildSrc/src/main/kotlin/io/tolgee/gradle/kotlin.gradle.kts b/buildSrc/src/main/kotlin/io/tolgee/gradle/kotlin.gradle.kts index 6445a31847..b7caade89b 100644 --- a/buildSrc/src/main/kotlin/io/tolgee/gradle/kotlin.gradle.kts +++ b/buildSrc/src/main/kotlin/io/tolgee/gradle/kotlin.gradle.kts @@ -1,8 +1,10 @@ package io.tolgee.gradle +import gradle.kotlin.dsl.plugins._1bc66e29931c9cc95ac26dbbe0d9f615.org import org.gradle.kotlin.dsl.kotlin plugins { + id("base") java kotlin("jvm") id("org.jetbrains.kotlin.kapt") @@ -10,9 +12,9 @@ plugins { id("org.jlleitschuh.gradle.ktlint") } -apply(plugin = "kotlin") -apply(plugin = "org.jetbrains.kotlin.kapt") -apply(plugin = "org.jetbrains.kotlin.plugin.allopen") +//apply(plugin = "kotlin") +//apply(plugin = "org.jetbrains.kotlin.kapt") +//apply(plugin = "org.jetbrains.kotlin.plugin.allopen") kotlin { jvmToolchain(11) @@ -34,3 +36,9 @@ ktlint { // attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL)) // } //} + +idea { + module { + generatedSourceDirs += files("${project.buildDir}/generated/source/kapt/main", "${project.buildDir}/generated/source/kaptKotlin/main") + } +} diff --git a/buildSrc/src/main/kotlin/io/tolgee/gradle/liquibase.gradle.kts b/buildSrc/src/main/kotlin/io/tolgee/gradle/liquibase.gradle.kts index e61e66faac..d5a24b027d 100644 --- a/buildSrc/src/main/kotlin/io/tolgee/gradle/liquibase.gradle.kts +++ b/buildSrc/src/main/kotlin/io/tolgee/gradle/liquibase.gradle.kts @@ -1,6 +1,7 @@ package io.tolgee.gradle plugins { + id("base") id("org.liquibase.gradle") } diff --git a/buildSrc/src/main/kotlin/io/tolgee/gradle/spring.gradle.kts b/buildSrc/src/main/kotlin/io/tolgee/gradle/spring.gradle.kts index 9f219f9bc4..6cd8781ed8 100644 --- a/buildSrc/src/main/kotlin/io/tolgee/gradle/spring.gradle.kts +++ b/buildSrc/src/main/kotlin/io/tolgee/gradle/spring.gradle.kts @@ -1,6 +1,8 @@ package io.tolgee.gradle plugins { + id("base") + id("kotlin") id("io.spring.dependency-management") // Classes annotated with @Configuration, @Controller, @RestController, @Service or @Repository are automatically opened @@ -10,6 +12,14 @@ plugins { id("org.springframework.boot") } -apply(plugin = "org.jetbrains.kotlin.plugin.spring") -apply(plugin = "org.springframework.boot") -apply(plugin = "io.spring.dependency-management") +//apply(plugin = "org.jetbrains.kotlin.plugin.spring") +//apply(plugin = "org.springframework.boot") +//apply(plugin = "io.spring.dependency-management") + +configure { + annotation("org.springframework.stereotype.Component") + annotation("org.springframework.stereotype.Service") + annotation("org.springframework.transaction.annotation.Transactional") + annotation("org.springframework.beans.factory.annotation.Configurable") + annotation("org.springframework.boot.test.context.SpringBootTest") +} diff --git a/ee/backend/app/build.gradle b/ee/backend/app/build.gradle index 838f979236..391b136317 100644 --- a/ee/backend/app/build.gradle +++ b/ee/backend/app/build.gradle @@ -1,23 +1,11 @@ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' id 'io.tolgee.gradle.hibernate' id 'io.tolgee.gradle.liquibase' } -allOpen { - annotation("javax.persistence.Entity") - annotation("javax.persistence.MappedSuperclass") - annotation("javax.persistence.Embeddable") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.transaction.annotation.Transactional") - annotation("org.springframework.beans.factory.annotation.Configurable") - annotation("org.springframework.boot.test.context.SpringBootTest") -} - test { useJUnitPlatform() maxHeapSize = "2048m" diff --git a/ee/backend/tests/build.gradle b/ee/backend/tests/build.gradle index 3b3e13331a..17c17e0405 100644 --- a/ee/backend/tests/build.gradle +++ b/ee/backend/tests/build.gradle @@ -1,21 +1,10 @@ plugins { - id 'io.tolgee.gradle.base' id 'io.tolgee.gradle.kotlin' id 'io.tolgee.gradle.spring' id 'io.tolgee.gradle.hibernate' } -allOpen { - annotation("javax.persistence.MappedSuperclass") - annotation("javax.persistence.Embeddable") - annotation("org.springframework.stereotype.Service") - annotation("org.springframework.stereotype.Component") - annotation("org.springframework.transaction.annotation.Transactional") - annotation("org.springframework.beans.factory.annotation.Configurable") - annotation("org.springframework.boot.test.context.SpringBootTest") -} - test { useJUnitPlatform() maxHeapSize = "2048m"