Update build.gradle syntax

This commit is contained in:
JeremyStar™ 2024-07-08 12:39:04 +02:00
parent 1e5f48f413
commit 541919c891
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
8 changed files with 131 additions and 131 deletions

View file

@ -18,44 +18,44 @@
*/ */
plugins { plugins {
id 'java' id("java")
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
id "com.gorylenko.gradle-git-properties" version "${pluginGitProperties}" id "com.gorylenko.gradle-git-properties" version "${pluginGitProperties}"
id 'maven-publish' id("maven-publish")
} }
dependencies { dependencies {
// -> Runtime <- // -> Runtime <-
// Lombok // Lombok
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations // JetBrains Annotations
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// ANSI support // ANSI support
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi implementation("org.fusesource.jansi:jansi:${dependencyJansi}")
// Reflections // Reflections
implementation 'org.reflections:reflections:' + project.dependencyReflections implementation "org.reflections:reflections:" + project.dependencyReflections
// -> Testing <- // -> Testing <-
// Jetbrains Annotations // Jetbrains Annotations
testCompileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations testCompileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// JUnit // JUnit
testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJunit) testImplementation(platform("org.junit:junit-bom:${dependencyJunit}"))
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// jOOR // jOOR
testImplementation 'org.jooq:joor:' + project.dependencyJoor testImplementation("org.jooq:joor:${dependencyJoor}")
} }
gitProperties { gitProperties {
dotGitDirectory = file("${rootProject.rootDir}/.git") dotGitDirectory = file("${rootProject.rootDir}/.git")
failOnNoGitDirectory = false failOnNoGitDirectory = false
extProperty = 'gitProps' extProperty = "gitProps"
dateFormat = "yyyy-MM-dd'T'HH:mmZ" dateFormat = "yyyy-MM-dd'T'HH:mmZ"
dateFormatTimeZone = "UTC" dateFormatTimeZone = "UTC"
@ -70,10 +70,10 @@ tasks.register("writeGitProperties") {
source.renameTo(target) source.renameTo(target)
} }
outputs.upToDateWhen { false } outputs.upToDateWhen({ false })
} }
generateGitProperties.outputs.upToDateWhen { false } generateGitProperties.outputs.upToDateWhen({ false })
processResources.dependsOn 'writeGitProperties' processResources.dependsOn(writeGitProperties)
javadoc.options { javadoc.options {
setMemberLevel(JavadocMemberLevel.PUBLIC) setMemberLevel(JavadocMemberLevel.PUBLIC)
@ -88,7 +88,7 @@ javadoc.options {
test { test {
useJUnitPlatform() useJUnitPlatform()
testLogging { testLogging {
events "passed", "skipped", "failed" events("passed", "skipped", "failed")
} }
} }

View file

@ -18,22 +18,22 @@
*/ */
plugins { plugins {
id 'java' id("java")
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
id 'maven-publish' id("maven-publish")
} }
tasks.register('javadocAll', Javadoc) { tasks.register("javadocAll", Javadoc) {
setDescription("Generates Javadoc API documentation for all subprojects.") setDescription("Generates Javadoc API documentation for all subprojects.")
setGroup("documentation") setGroup("documentation")
def subprojects= [ def subprojects= [
':base', ":base",
':testapp', ":testapp",
] ]
setSource(subprojects.collect { project(it).sourceSets.main.allJava }) setSource(subprojects.collect({ project(it).sourceSets.main.allJava }))
setClasspath(files(subprojects.collect { project(it).sourceSets.main.compileClasspath })) setClasspath(files(subprojects.collect({ project(it).sourceSets.main.compileClasspath })))
setDestinationDir(file("build/docs/javadoc")) setDestinationDir(file("build/docs/javadoc"))
options { options {
@ -46,12 +46,12 @@ tasks.register('javadocAll', Javadoc) {
]) ])
} }
dependsOn delombok dependsOn(delombok)
} }
allprojects { allprojects {
group = project.group group = project.group
version = project.versioningVersion + '-' + project.versioningType + project.versioningTyperelease + project.versioningFork version = project.versioningVersion + "-" + project.versioningType + project.versioningTyperelease + project.versioningFork
repositories { repositories {
mavenCentral() mavenCentral()

View file

@ -35,7 +35,7 @@ dependencyLwjgl=3.3.3
dependencyLwjglNatives= dependencyLwjglNatives=
# Test dependencies # Test dependencies
dependencyJunit=11.0-M2 dependencyJunit=5.11.0-M2
dependencyJoor=0.9.14 dependencyJoor=0.9.14
# Plugins # Plugins

View file

@ -18,34 +18,34 @@
*/ */
plugins { plugins {
id 'java' id("java")
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
} }
dependencies { dependencies {
// -> Runtime <- // -> Runtime <-
// Lombok // Lombok
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations // JetBrains Annotations
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// -> Testing <- // -> Testing <-
// Jetbrains Annotations // Jetbrains Annotations
testCompileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations testCompileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// JUnit // JUnit
testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJunit) testImplementation(platform("org.junit:junit-bom:${dependencyJunit}"))
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// jOOR // jOOR
testImplementation 'org.jooq:joor:' + project.dependencyJoor testImplementation("org.jooq:joor:${dependencyJoor}")
// -> Project <- // -> Project <-
implementation project(":base") implementation(project(":base"))
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why implementation("org.fusesource.jansi:jansi:${dependencyJansi}") // for some reason required or the build fails don"t ask me why
} }
javadoc.options { javadoc.options {
@ -61,6 +61,6 @@ javadoc.options {
test { test {
useJUnitPlatform() useJUnitPlatform()
testLogging { testLogging {
events "passed", "skipped", "failed" events("passed", "skipped", "failed")
} }
} }

View file

@ -20,8 +20,8 @@
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
plugins { plugins {
id 'java' id("java")
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
} }
// Determine LWJGL native stuff // Determine LWJGL native stuff
@ -51,51 +51,51 @@ switch (OperatingSystem.current()) {
dependencies { dependencies {
// -> Runtime <- // -> Runtime <-
// Lombok // Lombok
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations // JetBrains Annotations
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// LWJGL // LWJGL
implementation platform("org.lwjgl:lwjgl-bom:${dependencyLwjgl}") implementation(platform("org.lwjgl:lwjgl-bom:${dependencyLwjgl}"))
implementation "org.lwjgl:lwjgl" implementation("org.lwjgl:lwjgl")
implementation "org.lwjgl:lwjgl-bgfx" implementation("org.lwjgl:lwjgl-bgfx")
implementation "org.lwjgl:lwjgl-egl" implementation("org.lwjgl:lwjgl-egl")
implementation "org.lwjgl:lwjgl-glfw" implementation("org.lwjgl:lwjgl-glfw")
implementation "org.lwjgl:lwjgl-ktx" implementation("org.lwjgl:lwjgl-ktx")
implementation "org.lwjgl:lwjgl-opengl" implementation("org.lwjgl:lwjgl-opengl")
implementation "org.lwjgl:lwjgl-opengles" implementation("org.lwjgl:lwjgl-opengles")
implementation "org.lwjgl:lwjgl-shaderc" implementation("org.lwjgl:lwjgl-shaderc")
implementation "org.lwjgl:lwjgl-sse" implementation("org.lwjgl:lwjgl-sse")
implementation "org.lwjgl:lwjgl-vma" implementation("org.lwjgl:lwjgl-vma")
runtimeOnly "org.lwjgl:lwjgl::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-bgfx::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-bgfx::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-glfw::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-glfw::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-ktx::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-ktx::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-opengl::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-opengl::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-opengles::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-opengles::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-shaderc::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-shaderc::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-sse::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-sse::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-vma::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-vma::${dependencyLwjglNatives}")
if (project.dependencyLwjglNatives == "natives-macos" || project.dependencyLwjglNatives == "natives-macos-arm64") runtimeOnly "org.lwjgl:lwjgl-vulkan::${dependencyLwjglNatives}" if (project.dependencyLwjglNatives == "natives-macos" || project.dependencyLwjglNatives == "natives-macos-arm64") runtimeOnly("org.lwjgl:lwjgl-vulkan::${dependencyLwjglNatives}")
// -> Testing <- // -> Testing <-
// Jetbrains Annotations // Jetbrains Annotations
testCompileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations testCompileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// JUnit // JUnit
testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJunit) testImplementation(platform("org.junit:junit-bom:${dependencyJunit}"))
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// jOOR // jOOR
testImplementation 'org.jooq:joor:' + project.dependencyJoor testImplementation("org.jooq:joor:${dependencyJoor}")
// -> Project <- // -> Project <-
implementation project(":base") implementation(project(":base"))
implementation project(":graphics") implementation(project(":graphics"))
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why implementation("org.fusesource.jansi:jansi:${dependencyJansi}") // for some reason required or the build fails don"t ask me why
} }
javadoc.options { javadoc.options {
@ -111,6 +111,6 @@ javadoc.options {
test { test {
useJUnitPlatform() useJUnitPlatform()
testLogging { testLogging {
events "passed", "skipped", "failed" events("passed", "skipped", "failed")
} }
} }

View file

@ -20,8 +20,8 @@
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
plugins { plugins {
id 'java' id("java")
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
} }
// Determine LWJGL native stuff // Determine LWJGL native stuff
@ -51,48 +51,48 @@ switch (OperatingSystem.current()) {
dependencies { dependencies {
// -> Runtime <- // -> Runtime <-
// Lombok // Lombok
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations // JetBrains Annotations
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// LWJGL // LWJGL
implementation platform("org.lwjgl:lwjgl-bom:${dependencyLwjgl}") implementation(platform("org.lwjgl:lwjgl-bom:${dependencyLwjgl}"))
implementation "org.lwjgl:lwjgl" implementation("org.lwjgl:lwjgl")
implementation "org.lwjgl:lwjgl-bgfx" implementation("org.lwjgl:lwjgl-bgfx")
implementation "org.lwjgl:lwjgl-egl" implementation("org.lwjgl:lwjgl-egl")
implementation "org.lwjgl:lwjgl-glfw" implementation("org.lwjgl:lwjgl-glfw")
implementation "org.lwjgl:lwjgl-ktx" implementation("org.lwjgl:lwjgl-ktx")
implementation "org.lwjgl:lwjgl-shaderc" implementation("org.lwjgl:lwjgl-shaderc")
implementation "org.lwjgl:lwjgl-sse" implementation("org.lwjgl:lwjgl-sse")
implementation "org.lwjgl:lwjgl-vma" implementation("org.lwjgl:lwjgl-vma")
implementation "org.lwjgl:lwjgl-vulkan" implementation("org.lwjgl:lwjgl-vulkan")
runtimeOnly "org.lwjgl:lwjgl::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-bgfx::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-bgfx::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-glfw::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-glfw::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-ktx::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-ktx::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-shaderc::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-shaderc::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-sse::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-sse::${dependencyLwjglNatives}")
runtimeOnly "org.lwjgl:lwjgl-vma::${dependencyLwjglNatives}" runtimeOnly("org.lwjgl:lwjgl-vma::${dependencyLwjglNatives}")
if (project.dependencyLwjglNatives == "natives-macos" || project.dependencyLwjglNatives == "natives-macos-arm64") runtimeOnly "org.lwjgl:lwjgl-vulkan::${dependencyLwjglNatives}" if (project.dependencyLwjglNatives == "natives-macos" || project.dependencyLwjglNatives == "natives-macos-arm64") runtimeOnly("org.lwjgl:lwjgl-vulkan::${dependencyLwjglNatives}")
// -> Testing <- // -> Testing <-
// Jetbrains Annotations // Jetbrains Annotations
testCompileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations testCompileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// JUnit // JUnit
testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJunit) testImplementation(platform("org.junit:junit-bom:${dependencyJunit}"))
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// jOOR // jOOR
testImplementation 'org.jooq:joor:' + project.dependencyJoor testImplementation("org.jooq:joor:${dependencyJoor}")
// -> Project <- // -> Project <-
implementation project(":base") implementation(project(":base"))
implementation project(":graphics") implementation(project(":graphics"))
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why implementation("org.fusesource.jansi:jansi:${dependencyJansi}") // for some reason required or the build fails don"t ask me why
} }
javadoc.options { javadoc.options {
@ -108,6 +108,6 @@ javadoc.options {
test { test {
useJUnitPlatform() useJUnitPlatform()
testLogging { testLogging {
events "passed", "skipped", "failed" events("passed", "skipped", "failed")
} }
} }

View file

@ -18,26 +18,26 @@
*/ */
plugins { plugins {
id 'java' id("java")
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
id 'maven-publish' id("maven-publish")
} }
dependencies { dependencies {
// -> Runtime <- // -> Runtime <-
// Lombok // Lombok
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations // JetBrains Annotations
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// SLF4J // SLF4J
implementation 'org.slf4j:slf4j-api:' + project.dependencySlf4j implementation("org.slf4j:slf4j-api:${dependencySlf4j}")
// -> Project <- // -> Project <-
implementation project(":base") implementation(project(":base"))
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why implementation("org.fusesource.jansi:jansi:${dependencyJansi}") // for some reason required or the build fails don"t ask me why
} }
javadoc.options { javadoc.options {
@ -53,7 +53,7 @@ javadoc.options {
test { test {
useJUnitPlatform() useJUnitPlatform()
testLogging { testLogging {
events "passed", "skipped", "failed" events("passed", "skipped", "failed")
} }
} }

View file

@ -18,28 +18,28 @@
*/ */
plugins { plugins {
id 'java' id("java")
id 'application' id "application"
id 'io.freefair.lombok' version "${pluginLombok}" id("io.freefair.lombok") version("${pluginLombok}")
id 'io.github.goooler.shadow' version "${pluginShadow}" id("io.github.goooler.shadow") version("${pluginShadow}")
} }
dependencies { dependencies {
// -> Runtime <- // -> Runtime <-
// Lombok // Lombok
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok compileOnly("org.projectlombok:lombok:${dependencyLombok}")
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor("org.projectlombok:lombok:${dependencyLombok}")
// JetBrains Annotations // JetBrains Annotations
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}")
// -> Project <- // -> Project <-
implementation project(":base") implementation(project(":base"))
implementation project(":slf4j-compat") implementation(project(":slf4j-compat"))
implementation project(":graphics") implementation(project(":graphics"))
implementation project(":graphics:vulkan") implementation project(":graphics:vulkan")
implementation project(":graphics:opengl") implementation project(":graphics:opengl")
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why implementation("org.fusesource.jansi:jansi:${dependencyJansi}") // for some reason required or the build fails don"t ask me why
} }
javadoc.options { javadoc.options {
@ -55,7 +55,7 @@ javadoc.options {
jar { jar {
manifest { manifest {
attributes( attributes(
'Main-Class': 'de.staropensource.sosengine.testapp.Main' "Main-Class": "de.staropensource.sosengine.testapp.Main"
) )
} }
} }