GTNewHorizons / RetroFuturaGradle

A Gradle plugin for development of Minecraft 1.7.10 modifications, aiming to replace use of the legacy ForgeGradle toolchain.
https://gtnewhorizons.github.io/RetroFuturaGradle/?version=master
GNU Lesser General Public License v2.1
46 stars 13 forks source link

An error when using a module as dependency #66

Closed ghost closed 6 months ago

ghost commented 6 months ago

The error itself:

Could not determine the dependencies of task ':retromine:clientShadowJar'.
> Could not resolve all files for configuration ':retromine:shadowImplementation'.
   > The consumer was configured to find attribute 'com.gtnewhorizons.retrofuturagradle.obfuscation' with value 'mcp', attribute 'rfgDeobfuscatorTransformed' with value 'true'. However we cannot choose between the following variants of project :core:
       - Configuration ':core:runtimeElements' variant classes:
           - Unmatched attributes:
               - Provides artifactType 'java-classes-directory' but the consumer didn't ask for it
               - Doesn't say anything about com.gtnewhorizons.retrofuturagradle.obfuscation (required 'mcp')
               - Provides org.gradle.category 'library' but the consumer didn't ask for it
               - Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it
               - Provides org.gradle.jvm.environment 'standard-jvm' but the consumer didn't ask for it
               - Provides org.gradle.jvm.version '8' but the consumer didn't ask for it
               - Provides org.gradle.libraryelements 'classes' but the consumer didn't ask for it
               - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
               - Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
               - Doesn't say anything about rfgDeobfuscatorTransformed (required 'true')
       - Configuration ':core:runtimeElements' variant resources:
           - Unmatched attributes:
               - Provides artifactType 'java-resources-directory' but the consumer didn't ask for it
               - Doesn't say anything about com.gtnewhorizons.retrofuturagradle.obfuscation (required 'mcp')
               - Provides org.gradle.category 'library' but the consumer didn't ask for it
               - Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it
               - Provides org.gradle.jvm.environment 'standard-jvm' but the consumer didn't ask for it
               - Provides org.gradle.jvm.version '8' but the consumer didn't ask for it
               - Provides org.gradle.libraryelements 'resources' but the consumer didn't ask for it
               - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
               - Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
               - Doesn't say anything about rfgDeobfuscatorTransformed (required 'true')
     The following variants were also considered but didn't match the requested attributes:
       - Configuration ':core:runtimeElements':
           - Incompatible because this component declares attribute 'rfgDeobfuscatorTransformed' with value 'false' and the consumer needed attribute 'rfgDeobfuscatorTransformed' with value 'true'
           - Other compatible attribute:
               - Doesn't say anything about com.gtnewhorizons.retrofuturagradle.obfuscation (required 'mcp')

The dependency is a module collection of common code (without dependencies).

ghost commented 6 months ago

Resolved by defining the rfgDebofuscatorTransformed attribute for runtimeElements configuration in the dependency module to true.