Jump to content

Forge Gradle Deprecation Warnings


yoshiquest

Recommended Posts

Ok, I'm using an external plugin for forge gradle called clojuresque in order to compile clojure code. This actually works rather well but... every time I run this thing the console always spams this:

 

 

 

'warnOnReflection' is deprecated and will go away in a future version. Please use 'clojure.warnOnReflection' instead.

'aotCompile' is deprecated and will go away in a future version. Please use 'clojure.aotCompile' instead.

'warnOnReflection' is deprecated and will go away in a future version. Please use 'clojure.warnOnReflection' instead.

'aotCompile' is deprecated and will go away in a future version. Please use 'clojure.aotCompile' instead.

'warnOnReflection' is deprecated and will go away in a future version. Please use 'clojure.warnOnReflection' instead.

'aotCompile' is deprecated and will go away in a future version. Please use 'clojure.aotCompile' instead.

'warnOnReflection' is deprecated and will go away in a future version. Please use 'clojure.warnOnReflection' instead.

'aotCompile' is deprecated and will go away in a future version. Please use 'clojure.aotCompile' instead.

 

 

And my build.gradle file looks like this:

 

 

 

buildscript {

    repositories {

        mavenCentral()

        maven {

            name = "forge"

            url = "http://files.minecraftforge.net/maven"

        }

        maven { url "http://clojars.org/repo" }

        maven {

            name = "sonatype"

            url = "https://oss.sonatype.org/content/repositories/snapshots/"

        }

 

    }

    dependencies {

classpath 'clojuresque:clojuresque:1.7.0'

classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'

    }

}

 

repositories {maven { url "http://clojars.org/repo" }}

 

apply plugin: 'clojure'

 

clojure.warnOnReflection = true

clojure.aotCompile = true

 

apply plugin: 'forge'

 

version = ""

group= "forge_clj.core" // http://maven.apache.org/guides/mini/guide-naming-conventions.html

archivesBaseName = "forge_clj"

 

minecraft {

    version = "1.7.10-10.13.4.1448-1.7.10"

    runDir = "eclipse"

}

 

configurations {

shade

compile.extendsFrom shade

}

 

dependencies {

    // you may put jars on which you depend on in ./libs

    // or you may define them like so..

    //compile "some.group:artifact:version:classifier"

    //compile "some.group:artifact:version"

     

    // real examples

    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env

    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

 

    // for more info...

    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html

    // http://www.gradle.org/docs/current/userguide/dependency_management.html

 

shade 'org.clojure:clojure:1.7.0'

}

 

jar {

    configurations.shade.each { dep ->

        from(project.zipTree(dep)){

            exclude 'META-INF', 'META-INF/**'

        }

    }

}

 

task deobfJar(type: Jar) {

    from sourceSets.main.output

    classifier = 'dev'

}

 

tasks.build.dependsOn('deobfJar')

 

processResources

{

    // this will ensure that this task is redone when the versions change.

    inputs.property "version", project.version

    inputs.property "mcversion", project.minecraft.version

 

    // replace stuff in mcmod.info, nothing else

    from(sourceSets.main.resources.srcDirs) {

        include 'mcmod.info'

               

        // replace version and mcversion

        expand 'version':project.version, 'mcversion':project.minecraft.version

    }

       

    // copy everything else, thats not the mcmod.info

    from(sourceSets.main.resources.srcDirs) {

        exclude 'mcmod.info'

    }

}

 

 

 

Even if I remove the clojure.warnOnReflection = true line, and clojure.aotCompile = true line, it still spams this message, and it's getting annoying, and might be confusing to other modders using the library made with this.

 

So what I'm asking is mainly if there's a way to just suppress the deprecation warnings on this thing. If I had to guess, the issue is probably in the plugin itself (it's been abandoned for ~2 years, but still works). I can do without a solution, but it'd be nice if there's a way to prevent it.

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Backup the world and make a test without this mod
    • You allocated too much RAM to the game, so the OS, drivers and other things are fighting for resources. Close as many things as you can when playing, allocate 3GB or 3.5GB max, do not set a min. In task manager go to the startup tab and disable things you don’t need to start and have always running when you turn on your PC, but ignore the AMD ones in the list (they’re needed). Use Java 21 instead of Java 17. Consider removing Alex’s Mobs. Update your Radeon drivers (see the FAQ). Consider buying more physical RAM for your PC
    • Try deliting feur builder  It caused this issue in my modpack
    • I am not using hardcoded recipes, I'm using Vanilla's already existing code for leather armor dying. (via extending and implementing DyeableArmorItem / DyeableLeatherItem respectively) I have actually figured out that it's something to do with registering item colors to the ItemColors instance, but I'm trying to figure out where exactly in my mod's code I would be placing a call to the required event handler. Unfortunately the tutorial is criminally undescriptive. The most I've found is that it has to be done during client initialization. I'm currently trying to do the necessary setup via hijacking the item registry since trying to modify the item classes directly (via using SubscribeEvent in the item's constructor didn't work. Class so far: // mrrp mrow - mcmod item painter v1.0 - catzrule ch package catzadvitems.init; import net.minecraft.client.color.item.ItemColors; import net.minecraft.world.item.Item; import net.minecraftforge.registries.ObjectHolder; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.client.event.ColorHandlerEvent; import catzadvitems.item.DyeableWoolArmorItem; @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public class Painter { @ObjectHolder("cai:dyeable_wool_chestplate") public static final Item W_CHEST = null; @ObjectHolder("cai:dyeable_wool_leggings") public static final Item W_LEGS = null; @ObjectHolder("cai:dyeable_wool_boots") public static final Item W_SOCKS = null; public Painter() { // left blank, idk if forge throws a fit if constructors are missing, not taking the chance of it happening. } @SubscribeEvent public static void init(FMLClientSetupEvent event) { new Painter(); } @Mod.EventBusSubscriber private static class ForgeBusEvents { @SubscribeEvent public static void registerItemColors(ColorHandlerEvent.Item event) { ItemColors col = event.getItemColors(); col.register(DyeableUnderArmorItem::getItemDyedColor, W_CHEST, W_LEGS, W_SOCKS); //placeholder for other dye-able items here later.. } } } (for those wondering, i couldn't think of a creative wool helmet name)
    • nvm found out it was because i had create h and not f
  • Topics

×
×
  • Create New...

Important Information

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