commit 4c68f4ca13e4b96411666acb75465ff1c9f39b18 Author: lilly Date: Wed Jul 23 18:22:34 2025 -0500 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b1dff0d --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Kotlin ### +.kotlin + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..a0ccf77 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Environment-dependent path to Maven home directory +/mavenHomeManager.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..9d62f93 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..5cd9a10 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2da996a --- /dev/null +++ b/LICENSE @@ -0,0 +1,6 @@ +Copyright (c) 2025 Mae Rosaline +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9fdc41c --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# planterette + +This project uses [Gradle](https://gradle.org/). +To build and run the application, use the *Gradle* tool window by clicking the Gradle icon in the right-hand toolbar, +or run it directly from the terminal: + +* Run `./gradlew run` to build and run the application. +* Run `./gradlew build` to only build the application. +* Run `./gradlew check` to run all checks, including tests. +* Run `./gradlew clean` to clean all build outputs. + +Note the usage of the Gradle Wrapper (`./gradlew`). +This is the suggested way to use Gradle in production projects. + +[Learn more about the Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). + +[Learn more about Gradle tasks](https://docs.gradle.org/current/userguide/command_line_interface.html#common_tasks). + +This project follows the suggested multi-module setup and consists of the `app` and `api` subprojects. +The shared build logic was extracted to a convention plugin located in `buildSrc`. + +This project uses a version catalog (see `gradle/libs.versions.toml`) to declare and version dependencies +and both a build cache and a configuration cache (see `gradle.properties`). \ No newline at end of file diff --git a/api/build.gradle.kts b/api/build.gradle.kts new file mode 100644 index 0000000..9c0ff7d --- /dev/null +++ b/api/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("buildsrc.convention.kotlin-jvm") + alias(libs.plugins.kotlinPluginSerialization) +} + +dependencies { + implementation(libs.bundles.kotlinxEcosystem) + testImplementation(kotlin("test")) +} \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..bfba26b --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("buildsrc.convention.kotlin-jvm") + + application +} + +dependencies { + implementation(project(":api")) +} + +application { + mainClass = "app.hakurei.planterette.PlanteretteKt" +} diff --git a/app/src/main/kotlin/app/hakurei/planterette/Planterette.kt b/app/src/main/kotlin/app/hakurei/planterette/Planterette.kt new file mode 100644 index 0000000..735a8cd --- /dev/null +++ b/app/src/main/kotlin/app/hakurei/planterette/Planterette.kt @@ -0,0 +1,5 @@ +package app.hakurei.planterette + +fun main() { + +} \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 0000000..7b477e3 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + `kotlin-dsl` +} + +kotlin { + jvmToolchain(21) +} + +dependencies { + implementation(libs.kotlinGradlePlugin) +} diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 0000000..8e474c8 --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -0,0 +1,15 @@ +dependencyResolutionManagement { + + @Suppress("UnstableApiUsage") + repositories { + mavenCentral() + } + + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +rootProject.name = "buildSrc" \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/kotlin-jvm.gradle.kts new file mode 100644 index 0000000..8005336 --- /dev/null +++ b/buildSrc/src/main/kotlin/kotlin-jvm.gradle.kts @@ -0,0 +1,23 @@ +package buildsrc.convention + +import org.gradle.api.tasks.testing.logging.TestLogEvent + +plugins { + kotlin("jvm") +} + +kotlin { + jvmToolchain(21) +} + +tasks.withType().configureEach { + useJUnitPlatform() + + testLogging { + events( + TestLogEvent.FAILED, + TestLogEvent.PASSED, + TestLogEvent.SKIPPED + ) + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..6f78d3f --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +org.gradle.caching=true +org.gradle.configuration-cache=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..48380e2 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,17 @@ +[versions] +kotlin = "2.1.21" +kotlinxDatetime = "0.6.1" +kotlinxSerializationJSON = "1.7.3" +kotlinxCoroutines = "1.9.0" + +[libraries] +kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +kotlinxDatetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" } +kotlinxSerialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJSON" } +kotlinxCoroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } + +[bundles] +kotlinxEcosystem = ["kotlinxDatetime", "kotlinxSerialization", "kotlinxCoroutines"] + +[plugins] +kotlinPluginSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..54ff296 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,15 @@ +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") + repositories { + mavenCentral() + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} + +include(":app") +include(":api") + +rootProject.name = "planterette" \ No newline at end of file