From cdb4d0fdac9e72f49cd285e037f61049086076fd Mon Sep 17 00:00:00 2001 From: limepotato Date: Fri, 16 Feb 2024 02:41:36 -0700 Subject: [PATCH] Functioning hello world and build system --- .gitignore | 1 + .../dbcff70658daf80b53ce624f6adcaa529df5ed8d | 0 .idea/sonarlint/issuestore/index.pb | 22 -------------- .idea/sonarlint/securityhotspotstore/index.pb | 22 -------------- build.gradle.kts | 30 +++++++++++++++++++ .../kotlin/org/bm00/data-accessor/main.kt | 8 +++++ 6 files changed, 39 insertions(+), 44 deletions(-) delete mode 100644 .idea/sonarlint/issuestore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d delete mode 100644 .idea/sonarlint/issuestore/index.pb delete mode 100644 .idea/sonarlint/securityhotspotstore/index.pb create mode 100644 src/main/kotlin/org/bm00/data-accessor/main.kt diff --git a/.gitignore b/.gitignore index b63da45..0d8ed17 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ build/ .idea/jarRepositories.xml .idea/compiler.xml .idea/libraries/ +.idea/sonarlint/ *.iws *.iml *.ipr diff --git a/.idea/sonarlint/issuestore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d b/.idea/sonarlint/issuestore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d deleted file mode 100644 index e69de29..0000000 diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index 95366ce..0000000 --- a/.idea/sonarlint/issuestore/index.pb +++ /dev/null @@ -1,22 +0,0 @@ - -@ -build.gradle.kts,d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d -7 -TODO.md,b/5/b5b096f958319b1c7782c800c78c4c358a58d709 -w -G.idea/sonarlint/issuestore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d,5/9/597ee72a8e9f089a0f26608d0d77229bc4510a37 -7 -gradlew,5/b/5bbfa66edb4db3c7c33c5181f43510990d3307f9 -; - gradlew.bat,2/a/2a45a911a8f1836b0b6c5b758962572012d8f8c3 -X -(gradle/wrapper/gradle-wrapper.properties,f/b/fbe448ebfc3eb2d4e308f6b8b043666f5b57235e -C -settings.gradle.kts,7/4/749edfcc96398253e5b3416184e95c46621da850 -: - -.gitignore,a/5/a5cc2925ca8258af241be7e5b0381edf30266302 - -Q.idea/sonarlint/securityhotspotstore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d,e/c/ec4317fc3093e8c354ef226260d7fd566c3957fb -A -gradle.properties,2/a/2afbb999f001938c88fa43fc2ef52abf0f8213e4 \ No newline at end of file diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb deleted file mode 100644 index 95366ce..0000000 --- a/.idea/sonarlint/securityhotspotstore/index.pb +++ /dev/null @@ -1,22 +0,0 @@ - -@ -build.gradle.kts,d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d -7 -TODO.md,b/5/b5b096f958319b1c7782c800c78c4c358a58d709 -w -G.idea/sonarlint/issuestore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d,5/9/597ee72a8e9f089a0f26608d0d77229bc4510a37 -7 -gradlew,5/b/5bbfa66edb4db3c7c33c5181f43510990d3307f9 -; - gradlew.bat,2/a/2a45a911a8f1836b0b6c5b758962572012d8f8c3 -X -(gradle/wrapper/gradle-wrapper.properties,f/b/fbe448ebfc3eb2d4e308f6b8b043666f5b57235e -C -settings.gradle.kts,7/4/749edfcc96398253e5b3416184e95c46621da850 -: - -.gitignore,a/5/a5cc2925ca8258af241be7e5b0381edf30266302 - -Q.idea/sonarlint/securityhotspotstore/d/b/dbcff70658daf80b53ce624f6adcaa529df5ed8d,e/c/ec4317fc3093e8c354ef226260d7fd566c3957fb -A -gradle.properties,2/a/2afbb999f001938c88fa43fc2ef52abf0f8213e4 \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index f1485a5..3b369b1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,9 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import groovy.xml.dom.DOMCategory.attributes + plugins { kotlin("jvm") version "1.9.22" + id("com.github.johnrengelman.shadow") version "8.1.1" } group = "org.bm00" @@ -11,11 +15,37 @@ repositories { dependencies { testImplementation("org.jetbrains.kotlin:kotlin-test") + + implementation("com.gitlab.klamonte:jexer:1.6.0") + + implementation("dev.dirs:directories:26") } tasks.test { useJUnitPlatform() } + +tasks { + build { + dependsOn(shadowJar) + } +} + +tasks { + named("shadowJar") { + mergeServiceFiles() + manifest { + attributes(mapOf("Main-Class" to "org.bm00.data-accessor.MainKt")) + } + } +} + +val jar by tasks.getting(Jar::class) { + manifest { + attributes["Main-Class"] = "org.bm00.data-accessor.MainKt" + } +} + kotlin { jvmToolchain(19) } \ No newline at end of file diff --git a/src/main/kotlin/org/bm00/data-accessor/main.kt b/src/main/kotlin/org/bm00/data-accessor/main.kt new file mode 100644 index 0000000..88356f5 --- /dev/null +++ b/src/main/kotlin/org/bm00/data-accessor/main.kt @@ -0,0 +1,8 @@ +package org.bm00.`data-accessor` + +import java.util.* + +@Throws(Exception::class) +fun main(args: Array) { + Runtime.getRuntime().exec("touch /home/limepot/Desktop/hello.world") +}