Created
January 15, 2025 18:36
-
-
Save ogtega/d605a763b29acac003fa22bb8b322e94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file was generated by the Gradle 'init' task. | |
* | |
* This generated file contains a sample Java application project to get you started. | |
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.11.1/userguide/building_java_projects.html in the Gradle documentation. | |
*/ | |
plugins { | |
// Apply the application plugin to add support for building a CLI application in Java. | |
id 'application' | |
alias libs.plugins.spotless | |
} | |
repositories { | |
// Use Maven Central for resolving dependencies. | |
mavenCentral() | |
} | |
dependencies { | |
// Use JUnit Jupiter for testing. | |
testImplementation libs.junit.jupiter | |
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | |
// This dependency is used by the application. | |
implementation libs.guava | |
implementation enforcedPlatform(libs.helidon.deps) | |
implementation libs.bundles.helidon | |
implementation 'org.glassfish.jersey.media:jersey-media-json-binding' | |
runtimeOnly 'jakarta.activation:jakarta.activation-api' | |
runtimeOnly 'io.smallrye:jandex' | |
} | |
// Apply a specific Java toolchain to ease working on different environments. | |
java { | |
toolchain { | |
languageVersion = JavaLanguageVersion.of(21) | |
} | |
} | |
application { | |
// Define the main class for the application. | |
mainClass = 'io.helidon.microprofile.cdi.Main' | |
} | |
spotless { | |
java { | |
importOrder() | |
removeUnusedImports() | |
palantirJavaFormat() | |
} | |
} | |
tasks.named('test') { | |
// Use JUnit Platform for unit tests. | |
useJUnitPlatform() | |
} | |
tasks.register('moveBeans', Copy) { | |
dependsOn 'processResources' | |
dependsOn 'compileTestJava' | |
from("$buildDir/resources/main/META-INF/beans.xml") | |
into("$buildDir/classes/java/main/META-INF") | |
} | |
test.dependsOn 'moveBeans' | |
run.dependsOn 'moveBeans' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment