i got the multi project structure working (i think)
This commit is contained in:
parent
78d948b5c7
commit
5f21cd4cf9
26 changed files with 277 additions and 21 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,6 @@
|
||||||
|
# custom stuff
|
||||||
|
*.hprof
|
||||||
|
|
||||||
# ---> Gradle
|
# ---> Gradle
|
||||||
.gradle
|
.gradle
|
||||||
**/build/
|
**/build/
|
||||||
|
|
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
|
@ -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
|
1
.idea/.name
Normal file
1
.idea/.name
Normal file
|
@ -0,0 +1 @@
|
||||||
|
notcompute-root
|
9
.idea/compiler.xml
Normal file
9
.idea/compiler.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="17">
|
||||||
|
<module name="notcompute-root.main" target="18" />
|
||||||
|
<module name="notcompute-root.test" target="18" />
|
||||||
|
</bytecodeTargetLevel>
|
||||||
|
</component>
|
||||||
|
</project>
|
31
.idea/gradle.xml
Normal file
31
.idea/gradle.xml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<compositeConfiguration>
|
||||||
|
<compositeBuild compositeDefinitionSource="SCRIPT">
|
||||||
|
<builds>
|
||||||
|
<build path="$PROJECT_DIR$/buildSrc" name="buildSrc">
|
||||||
|
<projects>
|
||||||
|
<project path="$PROJECT_DIR$/buildSrc" />
|
||||||
|
</projects>
|
||||||
|
</build>
|
||||||
|
</builds>
|
||||||
|
</compositeBuild>
|
||||||
|
</compositeConfiguration>
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="#JAVA_HOME" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/buildSrc" />
|
||||||
|
<option value="$PROJECT_DIR$/emulator" />
|
||||||
|
<option value="$PROJECT_DIR$/fabric" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
50
.idea/jarRepositories.xml
Normal file
50
.idea/jarRepositories.xml
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="MavenRepo" />
|
||||||
|
<option name="name" value="MavenRepo" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="LoomLocalRemappedMods" />
|
||||||
|
<option name="name" value="LoomLocalRemappedMods" />
|
||||||
|
<option name="url" value="file:/$PROJECT_DIR$/.gradle/loom-cache/remapped_mods/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Fabric" />
|
||||||
|
<option name="name" value="Fabric" />
|
||||||
|
<option name="url" value="https://maven.fabricmc.net/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Mojang" />
|
||||||
|
<option name="name" value="Mojang" />
|
||||||
|
<option name="url" value="https://libraries.minecraft.net/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="LoomGlobalMinecraft" />
|
||||||
|
<option name="name" value="LoomGlobalMinecraft" />
|
||||||
|
<option name="url" value="file:/$USER_HOME$/.gradle/caches/fabric-loom/minecraftMaven/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="LoomLocalMinecraft" />
|
||||||
|
<option name="name" value="LoomLocalMinecraft" />
|
||||||
|
<option name="url" value="file:/$PROJECT_DIR$/.gradle/loom-cache/minecraftMaven/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Gradle Central Plugin Repository" />
|
||||||
|
<option name="name" value="Gradle Central Plugin Repository" />
|
||||||
|
<option name="url" value="https://plugins.gradle.org/m2" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/kotlinc.xml
Normal file
6
.idea/kotlinc.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.8.20" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/misc.xml
Normal file
8
.idea/misc.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="18" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
10
.idea/modules.xml
Normal file
10
.idea/modules.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fabric/notcompute-root.fabric.client.iml" filepath="$PROJECT_DIR$/.idea/modules/fabric/notcompute-root.fabric.client.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fabric/notcompute-root.fabric.main.iml" filepath="$PROJECT_DIR$/.idea/modules/fabric/notcompute-root.fabric.main.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/fabric/notcompute-root.fabric.test.iml" filepath="$PROJECT_DIR$/.idea/modules/fabric/notcompute-root.fabric.test.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
17
.idea/modules/fabric/notcompute-root.fabric.client.iml
Normal file
17
.idea/modules/fabric/notcompute-root.fabric.client.iml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="minecraft" name="Minecraft">
|
||||||
|
<configuration>
|
||||||
|
<autoDetectTypes>
|
||||||
|
<platformType>FABRIC</platformType>
|
||||||
|
<platformType>MIXIN</platformType>
|
||||||
|
<platformType>MCP</platformType>
|
||||||
|
</autoDetectTypes>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="McpModuleSettings">
|
||||||
|
<option name="srgType" value="SRG" />
|
||||||
|
</component>
|
||||||
|
</module>
|
17
.idea/modules/fabric/notcompute-root.fabric.main.iml
Normal file
17
.idea/modules/fabric/notcompute-root.fabric.main.iml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="minecraft" name="Minecraft">
|
||||||
|
<configuration>
|
||||||
|
<autoDetectTypes>
|
||||||
|
<platformType>FABRIC</platformType>
|
||||||
|
<platformType>MIXIN</platformType>
|
||||||
|
<platformType>MCP</platformType>
|
||||||
|
</autoDetectTypes>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="McpModuleSettings">
|
||||||
|
<option name="srgType" value="SRG" />
|
||||||
|
</component>
|
||||||
|
</module>
|
13
.idea/modules/fabric/notcompute-root.fabric.test.iml
Normal file
13
.idea/modules/fabric/notcompute-root.fabric.test.iml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="minecraft" name="Minecraft">
|
||||||
|
<configuration>
|
||||||
|
<autoDetectTypes>
|
||||||
|
<platformType>FABRIC</platformType>
|
||||||
|
<platformType>MIXIN</platformType>
|
||||||
|
</autoDetectTypes>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
11
buildSrc/build.gradle.kts
Normal file
11
buildSrc/build.gradle.kts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20")
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
plugins {
|
||||||
|
id("notcompute.kotlin-conventions-common")
|
||||||
|
application
|
||||||
|
}
|
|
@ -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>("test") {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
18
emulator/build.gradle.kts
Normal file
18
emulator/build.gradle.kts
Normal file
|
@ -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))
|
||||||
|
}
|
||||||
|
}
|
13
emulator/src/main/kotlin/pm/n2/emulator/EmulatorTest.kt
Normal file
13
emulator/src/main/kotlin/pm/n2/emulator/EmulatorTest.kt
Normal file
|
@ -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.")
|
||||||
|
}
|
|
@ -1,14 +1,15 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.3-SNAPSHOT'
|
id 'fabric-loom' version '1.3-SNAPSHOT'
|
||||||
id 'maven-publish'
|
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
|
version = project.mod_version
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
|
||||||
base {
|
base {
|
||||||
archivesName = project.archives_base_name
|
archivesName = "$project.archives_base_name-fabric"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
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.
|
// 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}"
|
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
|
||||||
|
implementation(project(":emulator"))
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
name = 'Fabric'
|
|
||||||
url = 'https://maven.fabricmc.net/'
|
|
||||||
}
|
|
||||||
mavenCentral()
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,6 +2,8 @@ package pm.n2
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer
|
import net.fabricmc.api.ModInitializer
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
import pm.n2.emulator.EmulatorTest
|
||||||
|
import pm.n2.emulator.bar
|
||||||
|
|
||||||
object ExampleMod : ModInitializer {
|
object ExampleMod : ModInitializer {
|
||||||
private val logger = LoggerFactory.getLogger("notcompute")
|
private val logger = LoggerFactory.getLogger("notcompute")
|
||||||
|
@ -11,5 +13,7 @@ object ExampleMod : ModInitializer {
|
||||||
// However, some things (like resources) may still be uninitialized.
|
// However, some things (like resources) may still be uninitialized.
|
||||||
// Proceed with mild caution.
|
// Proceed with mild caution.
|
||||||
logger.info("Hello Fabric world!")
|
logger.info("Hello Fabric world!")
|
||||||
|
EmulatorTest.foo()
|
||||||
|
bar()
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,17 +2,18 @@
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
# Fabric Properties
|
# versioning
|
||||||
# check these on https://fabricmc.net/develop
|
|
||||||
|
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
|
minecraft_version=1.20.1
|
||||||
yarn_mappings=1.20.1+build.10
|
yarn_mappings=1.20.1+build.10
|
||||||
loader_version=0.14.22
|
loader_version=0.14.22
|
||||||
fabric_kotlin_version=1.10.8+kotlin.1.9.0
|
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
|
fabric_version=0.86.1+1.20.1
|
0
fabric/gradlew → gradlew
vendored
0
fabric/gradlew → gradlew
vendored
0
fabric/gradlew.bat → gradlew.bat
vendored
0
fabric/gradlew.bat → gradlew.bat
vendored
10
settings.gradle.kts
Normal file
10
settings.gradle.kts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
maven("https://maven.fabricmc.net/")
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = "notcompute-root"
|
||||||
|
include("fabric","emulator")
|
Loading…
Reference in a new issue