Jump to content

[1.16.x] Module Dependency Number


urbanxx001

Recommended Posts

I'm implementing a soft dependency (gradle calls it module) in build.gradle. For instance, I looked at another mod's source that adds content associated with the quark mod:

dependencies {
    implementation fg.deobf("curse.maven:quark:3024740")
}

However, I don't know what the number represents and where to find it for other mods. It doesn't seem related to the version number.

Edited by urbanxx001
Link to comment
Share on other sites

So after attempting to refresh dependencies, the library isn't downloaded, even though the implementation and repository lines are correct. The error:

Could not find curse.maven:quark:3024740_mapped_snapshot_20200514-1.16.
Searched in the following locations:
  - https://files.minecraftforge.net/maven/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.pom
  - https://files.minecraftforge.net/maven/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.jar
  - file:/C:/Users/Name/.gradle/caches/forge_gradle/bundeled_repo/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.pom
  - file:/C:/Users/Name/.gradle/caches/forge_gradle/bundeled_repo/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.jar
  - https://libraries.minecraft.net/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.jar
  - https://repo.maven.apache.org/maven2/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.pom
  - https://repo.maven.apache.org/maven2/curse/maven/quark/3024740_mapped_snapshot_20200514-1.16/quark-3024740_mapped_snapshot_20200514-1.16.jar
Link to comment
Share on other sites

Full gradle:

buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
    }
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0'
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'modid'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
    // The mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   Snapshot are built nightly.
    // stable_#            Stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // Simply re-run your setup task after changing the mappings to update your workspace.
    mappings channel: 'snapshot', version: '20200514-1.16'
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    
    //accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

    // Default run configurations.
    // These can be tweaked, removed, or duplicated as needed.
    runs {
        client {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }
    }
}

dependencies {
   
    minecraft 'net.minecraftforge:forge:1.16.1-32.0.108'
    implementation fg.deobf("curse.maven:quark:3024740")
}

// Example configuration to allow publishing using the maven-publish task
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar') 
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
//publish.dependsOn('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file:///${project.projectDir}/mcmodsrepo"
        }
    }
}

 

Edited by urbanxx001
Link to comment
Share on other sites

A new latest.log isn't generated in run/logs, if you're referring to the separate file from the console log. Or I misunderstand. 

Edit: Everything is resolved after adding the cursemaven plugin:

plugins {
    id "com.wynprice.cursemaven" version "2.1.1"
}

Thank you anyway though!

Edited by urbanxx001
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.