Skip to content
Crystal Spider edited this page Nov 25, 2023 · 7 revisions

Adding Harvest With Ease as a dependency

Harvest With Ease mod files are hosted by CurseForge, so to add it as a dependency you can follow the tutorial on CurseMaven.
In short, here's an example of the code to put in your build.gradle file:

/*
 * Other stuff
 */
repositories {
  /* 
   * Other repositories
   */
  maven {
    url "https://cursemaven.com"
    content {
      includeGroup "curse.maven"
    }
  }
}
dependencies {
  /* 
   * Other dependencies
   */
  // Harvest With Ease dependency for different loaders, replace "xxxxxxx" with the file ID of the version you need.
  // Use this on Forge:
  implementation fg.deobf("curse.maven:harvestwithease-602171:xxxxxxx") 
  // Use this on Fabric:
  modImplementation "curse.maven:harvestwithease-602171:xxxxxxx"
  // Use this on NeoForge:
  api "curse.maven:harvestwithease-602171:xxxxxxx"
}

Finally, if you're on Forge/NeoForge remember to add the following to your mods.toml:

[[dependencies.modid]]
    modId="harvestwithease"
    mandatory=true # Set it to false if Harvest With Ease should be an optional dependency
    versionRange="[8.0.0.0,)" # As the time of writing, 8.0.0.0 is the latest version
    ordering="NONE"
    side="BOTH"

If you're on Fabric, add instead the following to your fabric.mod.json:

  "depends": {
    // Other properties
    "harvestwithease": "^8.0.0.0"
  }

Alternatively, if Harvest With Ease should be an optional dependency, add:

  "depends": {
    // Other properties
  },
  "suggests": {
    "harvestwithease": "^8.0.0.0"
  }