-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f078fc
commit 42557f4
Showing
18 changed files
with
313 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,36 @@ | ||
plugins { | ||
id 'org.jetbrains.kotlin.jvm' version '1.8.0' | ||
id 'org.jetbrains.kotlin.jvm' version '1.8.0' | ||
} | ||
archivesBaseName = getArtifactId("common") | ||
|
||
architectury { | ||
common(project.enabledPlatforms.split(",")) | ||
common(project.enabledPlatforms.split(",")) | ||
} | ||
|
||
loom { | ||
accessWidenerPath = file("src/main/resources/hexical.accesswidener") | ||
accessWidenerPath = file("src/main/resources/hexical.accesswidener") | ||
} | ||
|
||
dependencies { | ||
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies | ||
// Do NOT use other classes from fabric loader | ||
modImplementation "net.fabricmc:fabric-loader:${project.fabricLoaderVersion}" | ||
modApi "dev.architectury:architectury:${project.architecturyVersion}" | ||
|
||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | ||
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' // for @Nonnull | ||
|
||
modCompileOnly "at.petra-k.paucal:paucal-common-$minecraftVersion:$paucalVersion" | ||
modCompileOnly "at.petra-k.hexcasting:hexcasting-fabric-$minecraftVersion:$hexcastingVersion" | ||
modCompileOnly "vazkii.patchouli:Patchouli-xplat:$minecraftVersion-$patchouliVersion" | ||
modImplementation "net.fabricmc:fabric-loader:${project.fabricLoaderVersion}" | ||
modApi "dev.architectury:architectury:${project.architecturyVersion}" | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | ||
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' // for @Nonnull | ||
modCompileOnly "at.petra-k.paucal:paucal-common-$minecraftVersion:$paucalVersion" | ||
modCompileOnly "at.petra-k.hexcasting:hexcasting-fabric-$minecraftVersion:$hexcastingVersion" | ||
modCompileOnly "vazkii.patchouli:Patchouli-xplat:$minecraftVersion-$patchouliVersion" | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenCommon(MavenPublication) { | ||
artifactId = project.archivesBaseName | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
} | ||
repositories {} | ||
publications { | ||
mavenCommon(MavenPublication) { | ||
artifactId = project.archivesBaseName | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"accessWidener": "hexical.accesswidener" | ||
"accessWidener": "hexical.accesswidener" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"item.hexical.dummy_item": "Dummy Item", | ||
"hexcasting.spell.hexical:congrats": "Congrats", | ||
"hexcasting.spell.hexical:signum": "Signum Purification", | ||
"hexcasting.spell.book.hexical:congrats": "Dum. Spell Actn.", | ||
"hexcasting.spell.book.hexical:signum": "Dum. Actn.", | ||
"hexical.entry.dummy_spells": "Dummy Spells", | ||
"hexical.entry.dummy_actions": "Dummy Actions", | ||
"hexical.page.dummy_spells.congrats": "Accepts a player entity, tells them they are doing a good job.", | ||
"hexical.page.dummy_actions.signum": "Accepts a $(l:casting/101)number/$, returns -1 if it is negative, 0 if 0, 1 if positive.", | ||
"text.hexical.congrats": "Good job, %1$s!", | ||
"text.hexical.congrats.player": "a Player" | ||
"item.hexical.dummy_item": "Dummy Item", | ||
"hexcasting.spell.hexical:congrats": "Congrats", | ||
"hexcasting.spell.hexical:signum": "Signum Purification", | ||
"hexcasting.spell.book.hexical:congrats": "Dum. Spell Actn.", | ||
"hexcasting.spell.book.hexical:signum": "Dum. Actn.", | ||
"hexical.entry.dummy_spells": "Dummy Spells", | ||
"hexical.entry.dummy_actions": "Dummy Actions", | ||
"hexical.page.dummy_spells.congrats": "Accepts a player entity, tells them they are doing a good job.", | ||
"hexical.page.dummy_actions.signum": "Accepts a $(l:casting/101)number/$, returns -1 if it is negative, 0 if 0, 1 if positive.", | ||
"text.hexical.congrats": "Good job, %1$s!", | ||
"text.hexical.congrats.player": "a Player" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"required": true, | ||
"package": "miyucomics.hexical.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"minVersion": "0.8", | ||
"client": [ | ||
"HexicalMixin" | ||
], | ||
"mixins": [ | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
"required": true, | ||
"package": "miyucomics.hexical.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"minVersion": "0.8", | ||
"client": [ | ||
"HexicalMixin" | ||
], | ||
"mixins": [ | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,153 +1,96 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.1.2" | ||
id "me.modmuss50.mod-publish-plugin" version "0.3.0" | ||
id "com.github.johnrengelman.shadow" version "7.1.2" | ||
id "me.modmuss50.mod-publish-plugin" version "0.3.0" | ||
} | ||
|
||
archivesBaseName = getArtifactId("fabric") | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
fabric() | ||
platformSetupLoomIde() | ||
fabric() | ||
} | ||
|
||
loom { | ||
accessWidenerPath = project(":common").loom.accessWidenerPath | ||
accessWidenerPath = project(":common").loom.accessWidenerPath | ||
} | ||
|
||
configurations { | ||
common | ||
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentFabric.extendsFrom common | ||
common | ||
shadowCommon | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentFabric.extendsFrom common | ||
} | ||
|
||
dependencies { | ||
modCompileOnly(group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2') // for @Nonnull | ||
|
||
// Loaders and base APIs | ||
modImplementation "net.fabricmc:fabric-loader:${project.fabricLoaderVersion}" | ||
modApi "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}" | ||
modImplementation("net.fabricmc:fabric-language-kotlin:${project.fabricKotlinVersion}") | ||
modApi("dev.architectury:architectury-fabric:${architecturyVersion}") { | ||
// Fix for the "two fabric loaders" loading crash | ||
exclude group: "net.fabricmc", module: "fabric-loader" | ||
} | ||
|
||
// Hex Casting stuff | ||
modImplementation("at.petra-k.hexcasting:hexcasting-fabric-${minecraftVersion}:${hexcastingVersion}") { | ||
// If not excluded here, calls a nonexistent method and crashes the dev client | ||
exclude module: "phosphor" | ||
} | ||
|
||
modImplementation "at.petra-k.paucal:paucal-fabric-${minecraftVersion}:${paucalVersion}" | ||
modImplementation "vazkii.patchouli:Patchouli:${minecraftVersion}-${patchouliVersion}-FABRIC" | ||
|
||
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-api:${cardinalComponentsVersion}" | ||
|
||
modImplementation "com.jamieswhiteshirt:reach-entity-attributes:${entityReachVersion}" | ||
include "com.jamieswhiteshirt:reach-entity-attributes:${entityReachVersion}" | ||
|
||
modImplementation "io.github.tropheusj:serialization-hooks:${serializationHooksVersion}" | ||
include "io.github.tropheusj:serialization-hooks:${serializationHooksVersion}" | ||
|
||
modImplementation "dev.emi:trinkets:${trinketsVersion}" | ||
|
||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } | ||
modCompileOnly(group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2') | ||
modImplementation "net.fabricmc:fabric-loader:${project.fabricLoaderVersion}" | ||
modApi "net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}" | ||
modImplementation("net.fabricmc:fabric-language-kotlin:${project.fabricKotlinVersion}") | ||
modApi("dev.architectury:architectury-fabric:${architecturyVersion}") { | ||
exclude group: "net.fabricmc", module: "fabric-loader" | ||
} | ||
modImplementation("at.petra-k.hexcasting:hexcasting-fabric-${minecraftVersion}:${hexcastingVersion}") { | ||
exclude module: "phosphor" | ||
} | ||
modImplementation "at.petra-k.paucal:paucal-fabric-${minecraftVersion}:${paucalVersion}" | ||
modImplementation "vazkii.patchouli:Patchouli:${minecraftVersion}-${patchouliVersion}-FABRIC" | ||
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-api:${cardinalComponentsVersion}" | ||
modImplementation "com.jamieswhiteshirt:reach-entity-attributes:${entityReachVersion}" | ||
include "com.jamieswhiteshirt:reach-entity-attributes:${entityReachVersion}" | ||
modImplementation "io.github.tropheusj:serialization-hooks:${serializationHooksVersion}" | ||
include "io.github.tropheusj:serialization-hooks:${serializationHooksVersion}" | ||
modImplementation "dev.emi:trinkets:${trinketsVersion}" | ||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } | ||
} | ||
|
||
shadowJar { | ||
exclude "architectury.common.json" | ||
|
||
configurations = [project.configurations.shadowCommon] | ||
archiveClassifier.set "dev-shadow" | ||
exclude "architectury.common.json" | ||
configurations = [project.configurations.shadowCommon] | ||
archiveClassifier.set "dev-shadow" | ||
} | ||
|
||
remapJar { | ||
injectAccessWidener = true | ||
input.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
archiveClassifier.set null | ||
injectAccessWidener = true | ||
input.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
archiveClassifier.set null | ||
} | ||
|
||
jar { | ||
archiveClassifier.set "dev" | ||
archiveClassifier.set "dev" | ||
} | ||
|
||
sourcesJar { | ||
def commonSources = project(":common").sourcesJar | ||
dependsOn commonSources | ||
from commonSources.archiveFile.map { zipTree(it) } | ||
def commonSources = project(":common").sourcesJar | ||
dependsOn commonSources | ||
from commonSources.archiveFile.map { zipTree(it) } | ||
} | ||
|
||
components.java { | ||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { | ||
skip() | ||
} | ||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { | ||
skip() | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenFabric(MavenPublication) { | ||
artifactId = project.archivesBaseName + "-" + project.name + "-fabric" | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
} | ||
repositories {} | ||
publications { | ||
mavenFabric(MavenPublication) { | ||
artifactId = project.archivesBaseName + "-" + project.name + "-fabric" | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
publishMods { | ||
file = remapJar.archiveFile | ||
additionalFiles.from(sourcesJar.archiveFile) | ||
changelog = getLatestChangelog() | ||
type = STABLE | ||
modLoaders.add("fabric") | ||
modLoaders.add("quilt") | ||
|
||
version = project.version + "-fabric" | ||
displayName = "Hexical $project.version [Fabric]" | ||
|
||
// Uncomment your desired platform(s) | ||
// curseforge { | ||
// accessToken = project.curseforgeApiToken | ||
// projectId = project.curseforgeId | ||
// minecraftVersions.add(minecraftVersion) | ||
// | ||
// requires{ | ||
// slug = "fabric-api" | ||
// } | ||
// requires { | ||
// slug = "architectury-api" | ||
// } | ||
// requires { | ||
// slug = "fabric-language-kotlin" | ||
// } | ||
// requires { | ||
// slug = "hexcasting" | ||
// } | ||
// } | ||
// | ||
// modrinth { | ||
// accessToken = project.modrinthApiToken | ||
// projectId = project.modrinthId | ||
// minecraftVersions.add("1.19.2") | ||
// | ||
// requires{ | ||
// slug = "fabric-api" | ||
// } | ||
// requires { | ||
// slug = "architectury-api" | ||
// } | ||
// requires { | ||
// slug = "fabric-language-kotlin" | ||
// } | ||
// requires { | ||
// slug = "hex-casting" | ||
// } | ||
// } | ||
file = remapJar.archiveFile | ||
additionalFiles.from(sourcesJar.archiveFile) | ||
changelog = getLatestChangelog() | ||
type = STABLE | ||
modLoaders.add("fabric") | ||
modLoaders.add("quilt") | ||
version = project.version + "-fabric" | ||
displayName = "Hexical $project.version [Fabric]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.