diff options
author | uvok | 2025-07-08 20:51:28 +0200 |
---|---|---|
committer | uvok | 2025-07-08 20:51:28 +0200 |
commit | 28f938d39a80f34eb3cca54a232bcfdb17c2bea2 (patch) | |
tree | af4aa0540e82a68b82003bdff867f8dbd3a6b978 /buildSrc/src | |
parent | 62560529c4d5baff0a54d2a77ce9ab66c474596f (diff) |
Add back gradle
Diffstat (limited to 'buildSrc/src')
3 files changed, 76 insertions, 0 deletions
diff --git a/buildSrc/src/main/kotlin/buildlogic.java-application-conventions.gradle.kts b/buildSrc/src/main/kotlin/buildlogic.java-application-conventions.gradle.kts new file mode 100644 index 0000000..b9b34c9 --- /dev/null +++ b/buildSrc/src/main/kotlin/buildlogic.java-application-conventions.gradle.kts @@ -0,0 +1,11 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the common convention plugin for shared build configuration between library and application projects. + id("buildlogic.java-common-conventions") + + // Apply the application plugin to add support for building a CLI application in Java. + application +} diff --git a/buildSrc/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts b/buildSrc/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts new file mode 100644 index 0000000..137fa7c --- /dev/null +++ b/buildSrc/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts @@ -0,0 +1,37 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the java Plugin to add support for Java. + java +} + +repositories { + // Use Maven Central for resolving dependencies. + mavenCentral() +} + +dependencies { + constraints { + // Define dependency versions as constraints + implementation("org.apache.commons:commons-text:1.13.0") + } + + // Use JUnit Jupiter for testing. + testImplementation("org.junit.jupiter:junit-jupiter:5.12.1") + + testRuntimeOnly("org.junit.platform:junit-platform-launcher") +} + +// Apply a specific Java toolchain to ease working on different environments. +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +tasks.named<Test>("test") { + // Use JUnit Platform for unit tests. + useJUnitPlatform() +} diff --git a/buildSrc/src/main/kotlin/buildlogic.java-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/buildlogic.java-library-conventions.gradle.kts new file mode 100644 index 0000000..626e43d --- /dev/null +++ b/buildSrc/src/main/kotlin/buildlogic.java-library-conventions.gradle.kts @@ -0,0 +1,28 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the common convention plugin for shared build configuration between library and application projects. + id("buildlogic.java-common-conventions") + + // Apply the java-library plugin for API and implementation separation. + `java-library` +} + +val rootDirPath = rootProject.projectDir.absolutePath +var jarFilePath = "${rootDirPath}/repo/app/tuxguitar/tuxguitar-lib/9.99/tuxguitar-lib-9.99.jar" + +val javaFile = File(jarFilePath) // Create a File object + +if (!javaFile.exists()) { + logger.warn("The specified JAR file does not exist: $jarFilePath") +} else { + logger.warn("The specified JAR file does in fact exist: $jarFilePath") +} + +val jarFile = files(jarFilePath) + +dependencies { + implementation(jarFile) +} |