CIT Resewn

CIT Resewn

14M Downloads

Difficulty with compiling

MithicSpirit opened this issue ยท 2 comments

commented

It seems like Modrinth integration is enabled by default when running ./gradle build, which means that if I do not provide a TOKEN_MODRINTH the project fails to build. I believe that a similar issue is also present with Curseforge, although the error from Modrinth triggers first and stops compilation entirely.

I believe that this can be fixed by either making the integration be a separate command (so it doesn't affect ./gradlew build) or providing instructions on how to compile this project bypassing this. I used to have a patch I used for disabling Modrinth and Curseforge, but that was back for 1.19 and now that I've gotten around to updating to 1.20 the files have changed sufficiently that the patch no longer applies.

commented

Very intentional, you are not supposed to be compiling if you do not know how to work with gradle. The process depends on running on my machine which is by design.
If you want to commit PRs or build on your end in general, you could just comment out the publishing sections of the buildscripts:

CITResewn/build.gradle

Lines 63 to 114 in ad5ffa4

plugins.apply 'com.modrinth.minotaur'
plugins.apply 'com.matthewprenger.cursegradle'
modrinth {
token = TOKEN_MODRINTH
projectId = property('publish.modrinth.id')
uploadFile = remapJar
changelog = java.nio.file.Files.readString(rootProject.file("Changelog.md").toPath())
versionNumber = version
versionName = "v" + version
additionalFiles = [sourcesJar.outputs.getFiles().singleFile]
gameVersions = Arrays.asList(property('publish.target-mc').split(","))
}
curseforge {
apiKey = TOKEN_CURSEFORGE
project {
id = property('publish.curseforge.id')
changelogType = 'markdown'
changelog = rootProject.file('Changelog.md')
releaseType = 'release'
mainArtifact(remapJar) {
displayName = "v" + version
}
addGameVersion 'Fabric'
for (String version : property('publish.target-mc').split(","))
addGameVersion version
}
options {
forgeGradleIntegration = false
}
}
rootProject.tasks.register('publishActive') {
setGroup 'project'
if (gradle.startParameter.taskNames.contains(it.name)) {
System.out.println("Type the task name to confirm (${it.name}): ")
try (BufferedReader input = new BufferedReader(new InputStreamReader(System.in))) {
if (input.readLine() != it.name)
throw new GradleException('Task cancelled by user')
}
}
Task remapJarTask = tasks.getByName 'remapJar'
Task curseforgeTask = tasks.getByName 'curseforge'
Task modrinthTask = tasks.getByName 'modrinth'
dependsOn remapJarTask, curseforgeTask, modrinthTask
curseforgeTask.mustRunAfter remapJarTask
modrinthTask.mustRunAfter remapJarTask
}

plugins.apply 'com.modrinth.minotaur'
modrinth {
token = TOKEN_MODRINTH
projectId = property('publish.modrinth.defaults.id')
uploadFile = remapJar
versionNumber = version
versionName = "v" + version
additionalFiles = [sourcesJar.outputs.getFiles().singleFile]
gameVersions = Arrays.asList(property('publish.target-mc').split(","))
}
rootProject.tasks.named('publishActive') {
Task remapJarTask = tasks.getByName 'remapJar'
Task modrinthTask = tasks.getByName 'modrinth'
dependsOn remapJarTask, modrinthTask
modrinthTask.mustRunAfter remapJarTask
}

(ofc making sure not to commit the commented out parts)

commented

Yeah this is mainly just for testing newer builds since I like living on the bleeding edge (even when it cuts me). I am relatively familiar with Java itself, but I hate all Java tooling and usually just stick to GNU Make for my own things lmao. Thanks for the info.