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 | |
parent | 62560529c4d5baff0a54d2a77ce9ab66c474596f (diff) |
Add back gradle
-rw-r--r-- | .gitattributes | 12 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | buildSrc/build.gradle.kts | 13 | ||||
-rw-r--r-- | buildSrc/settings.gradle.kts | 14 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/buildlogic.java-application-conventions.gradle.kts | 11 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts | 37 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/buildlogic.java-library-conventions.gradle.kts | 28 | ||||
-rw-r--r-- | gradle.properties | 5 | ||||
-rw-r--r-- | gradle/libs.versions.toml | 10 | ||||
-rw-r--r-- | settings.gradle.kts | 14 | ||||
-rw-r--r-- | songsterr-importer/build.gradle.kts | 9 | ||||
-rw-r--r-- | songsterr-reader/build.gradle.kts | 11 |
12 files changed, 170 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f91f646 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# Linux start script should use lf +/gradlew text eol=lf + +# These are Windows script files and should use crlf +*.bat text eol=crlf + +# Binary files should be left untouched +*.jar binary + @@ -163,4 +163,9 @@ $RECYCLE.BIN/ # End of https://www.gitignore.io/api/git,java,maven,eclipse,windows -repo/
\ No newline at end of file +repo/ +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 0000000..0187847 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,13 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. + `kotlin-dsl` +} + +repositories { + // Use the plugin portal to apply community plugins in convention plugins. + gradlePluginPortal() +} diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 0000000..b42d0ff --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -0,0 +1,14 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This settings file is used to specify which projects to include in your build-logic build. + */ + +dependencyResolutionManagement { + // Reuse version catalog from the main build. + // versionCatalogs { + // create("libs", { from(files("../gradle/libs.versions.toml")) }) + // } +} + +rootProject.name = "buildSrc" 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) +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..377538c --- /dev/null +++ b/gradle.properties @@ -0,0 +1,5 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties + +org.gradle.configuration-cache=true + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..36eeac2 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,10 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +#commons-math3 = "3.6.1" +#guava = "33.4.5-jre" + +[libraries] +#commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" } +#guava = { module = "com.google.guava:guava", version.ref = "guava" } diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..22a5b99 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,14 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.14.3/userguide/multi_project_builds.html in the Gradle documentation. + */ + +plugins { + // Apply the foojay-resolver plugin to allow automatic download of JDKs + // id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0" +} + +rootProject.name = "songsterr-plugins" +include("songsterr-importer", "songsterr-reader") diff --git a/songsterr-importer/build.gradle.kts b/songsterr-importer/build.gradle.kts new file mode 100644 index 0000000..6ff4179 --- /dev/null +++ b/songsterr-importer/build.gradle.kts @@ -0,0 +1,9 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the java-library plugin for API and implementation separation. + `java-library` + id("buildlogic.java-library-conventions") +} diff --git a/songsterr-reader/build.gradle.kts b/songsterr-reader/build.gradle.kts new file mode 100644 index 0000000..300c062 --- /dev/null +++ b/songsterr-reader/build.gradle.kts @@ -0,0 +1,11 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +import java.io.File + +plugins { + // Apply the java-library plugin for API and implementation separation. + `java-library` + id("buildlogic.java-library-conventions") +} |