diff --git a/.gitignore b/.gitignore
index e9fea6e..dab2eae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# custom stuff
+*.hprof
+
# ---> Gradle
.gradle
**/build/
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..89ce491
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+notcompute-root
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..64282c2
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..6d7a72f
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..729f285
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..69e8615
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..337fcb3
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..d513647
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/fabric/notcompute-root.fabric.client.iml b/.idea/modules/fabric/notcompute-root.fabric.client.iml
new file mode 100644
index 0000000..2e14514
--- /dev/null
+++ b/.idea/modules/fabric/notcompute-root.fabric.client.iml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ FABRIC
+ MIXIN
+ MCP
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/fabric/notcompute-root.fabric.main.iml b/.idea/modules/fabric/notcompute-root.fabric.main.iml
new file mode 100644
index 0000000..2e14514
--- /dev/null
+++ b/.idea/modules/fabric/notcompute-root.fabric.main.iml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ FABRIC
+ MIXIN
+ MCP
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/fabric/notcompute-root.fabric.test.iml b/.idea/modules/fabric/notcompute-root.fabric.test.iml
new file mode 100644
index 0000000..29dfb36
--- /dev/null
+++ b/.idea/modules/fabric/notcompute-root.fabric.test.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ FABRIC
+ MIXIN
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
new file mode 100644
index 0000000..0f9112b
--- /dev/null
+++ b/buildSrc/build.gradle.kts
@@ -0,0 +1,11 @@
+plugins {
+ `kotlin-dsl`
+}
+
+repositories {
+ gradlePluginPortal()
+}
+
+dependencies {
+ implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20")
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/notcompute.kotlin-conventions-application.gradle.kts b/buildSrc/src/main/kotlin/notcompute.kotlin-conventions-application.gradle.kts
new file mode 100644
index 0000000..3803ada
--- /dev/null
+++ b/buildSrc/src/main/kotlin/notcompute.kotlin-conventions-application.gradle.kts
@@ -0,0 +1,4 @@
+plugins {
+ id("notcompute.kotlin-conventions-common")
+ application
+}
\ No newline at end of file
diff --git a/buildSrc/src/main/kotlin/notcompute.kotlin-conventions-common.gradle.kts b/buildSrc/src/main/kotlin/notcompute.kotlin-conventions-common.gradle.kts
new file mode 100644
index 0000000..3f8572b
--- /dev/null
+++ b/buildSrc/src/main/kotlin/notcompute.kotlin-conventions-common.gradle.kts
@@ -0,0 +1,24 @@
+plugins {
+ id("org.jetbrains.kotlin.jvm")
+}
+
+group = "pm.n2"
+version = "0.1"
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ constraints {
+ implementation("org.apache.commons:commons-text:1.10.0")
+ }
+
+ testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
+
+ testRuntimeOnly("org.junit.platform:junit-platform-launcher")
+}
+
+tasks.named("test") {
+ useJUnitPlatform()
+}
\ No newline at end of file
diff --git a/emulator/build.gradle.kts b/emulator/build.gradle.kts
new file mode 100644
index 0000000..8160c69
--- /dev/null
+++ b/emulator/build.gradle.kts
@@ -0,0 +1,18 @@
+plugins {
+ id("notcompute.kotlin-conventions-common")
+ id("org.jetbrains.kotlin.jvm")
+}
+
+version = providers.gradleProperty("emulator_version").get()
+group = providers.gradleProperty("maven_group").get()
+val baseName = providers.gradleProperty("archives_base_name").get()
+
+base {
+ archivesName = "$baseName-emulator"
+}
+
+java {
+ toolchain {
+ languageVersion.set(JavaLanguageVersion.of(17))
+ }
+}
\ No newline at end of file
diff --git a/emulator/src/main/kotlin/pm/n2/emulator/EmulatorTest.kt b/emulator/src/main/kotlin/pm/n2/emulator/EmulatorTest.kt
new file mode 100644
index 0000000..7968024
--- /dev/null
+++ b/emulator/src/main/kotlin/pm/n2/emulator/EmulatorTest.kt
@@ -0,0 +1,13 @@
+package pm.n2.emulator
+
+open class EmulatorTest {
+ companion object {
+ fun foo() {
+ println("this is the emulator submodule.")
+ }
+ }
+}
+
+fun bar() {
+ println("this is the free floating function.")
+}
\ No newline at end of file
diff --git a/fabric/build.gradle b/fabric/build.gradle
index ce6cf64..a5100ff 100644
--- a/fabric/build.gradle
+++ b/fabric/build.gradle
@@ -1,14 +1,15 @@
plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'maven-publish'
- id "org.jetbrains.kotlin.jvm" version "1.9.0"
+ id 'notcompute.kotlin-conventions-common'
+ id 'org.jetbrains.kotlin.jvm'
}
version = project.mod_version
group = project.maven_group
base {
- archivesName = project.archives_base_name
+ archivesName = "$project.archives_base_name-fabric"
}
repositories {
@@ -65,6 +66,7 @@ dependencies {
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
+ implementation(project(":emulator"))
}
processResources {
diff --git a/fabric/settings.gradle b/fabric/settings.gradle
deleted file mode 100644
index 75c4d72..0000000
--- a/fabric/settings.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-pluginManagement {
- repositories {
- maven {
- name = 'Fabric'
- url = 'https://maven.fabricmc.net/'
- }
- mavenCentral()
- gradlePluginPortal()
- }
-}
\ No newline at end of file
diff --git a/fabric/src/main/kotlin/pm/n2/ExampleMod.kt b/fabric/src/main/kotlin/pm/n2/ExampleMod.kt
index 56fc9ff..3d2d06b 100644
--- a/fabric/src/main/kotlin/pm/n2/ExampleMod.kt
+++ b/fabric/src/main/kotlin/pm/n2/ExampleMod.kt
@@ -2,6 +2,8 @@ package pm.n2
import net.fabricmc.api.ModInitializer
import org.slf4j.LoggerFactory
+import pm.n2.emulator.EmulatorTest
+import pm.n2.emulator.bar
object ExampleMod : ModInitializer {
private val logger = LoggerFactory.getLogger("notcompute")
@@ -11,5 +13,7 @@ object ExampleMod : ModInitializer {
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
logger.info("Hello Fabric world!")
+ EmulatorTest.foo()
+ bar()
}
}
\ No newline at end of file
diff --git a/fabric/gradle.properties b/gradle.properties
similarity index 53%
rename from fabric/gradle.properties
rename to gradle.properties
index 4c713d3..96c137e 100644
--- a/fabric/gradle.properties
+++ b/gradle.properties
@@ -2,17 +2,18 @@
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
-# Fabric Properties
-# check these on https://fabricmc.net/develop
+# versioning
+
+emulator_version = 0.0.1
+
+mod_version = 0.0.1
+maven_group = pm.n2
+archives_base_name = notcompute
+
+# fabric stuff and deps
+
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22
fabric_kotlin_version=1.10.8+kotlin.1.9.0
-
-# Mod Properties
-mod_version=1.0.0
-maven_group=pm.n2
-archives_base_name=notcompute
-
-# Dependencies
fabric_version=0.86.1+1.20.1
\ No newline at end of file
diff --git a/fabric/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from fabric/gradle/wrapper/gradle-wrapper.properties
rename to gradle/wrapper/gradle-wrapper.properties
diff --git a/fabric/gradlew b/gradlew
similarity index 100%
rename from fabric/gradlew
rename to gradlew
diff --git a/fabric/gradlew.bat b/gradlew.bat
similarity index 100%
rename from fabric/gradlew.bat
rename to gradlew.bat
diff --git a/settings.gradle.kts b/settings.gradle.kts
new file mode 100644
index 0000000..547830d
--- /dev/null
+++ b/settings.gradle.kts
@@ -0,0 +1,10 @@
+pluginManagement {
+ repositories {
+ maven("https://maven.fabricmc.net/")
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+rootProject.name = "notcompute-root"
+include("fabric","emulator")
\ No newline at end of file