Adds a variants from configuration#137
Closed
yannicklamprecht wants to merge 1 commit into
PaperMC:mainfrom
yannicklamprecht:task/add-reobfjar-to-variants-config-when-publish-to-maven-local-task-is-present
Closed
Adds a variants from configuration#137yannicklamprecht wants to merge 1 commit intoPaperMC:mainfrom yannicklamprecht:task/add-reobfjar-to-variants-config-when-publish-to-maven-local-task-is-present
yannicklamprecht wants to merge 1 commit into
PaperMC:mainfrom
yannicklamprecht:task/add-reobfjar-to-variants-config-when-publish-to-maven-local-task-is-present
Conversation
When maven publish plugin is present on userdev projects a normal publish results into a wrong module file in maven repository. This commit adds the missing reobfuscated jars to this module file.
electronicboy
previously approved these changes
Mar 9, 2022
Member
|
This isn't the correct approach, for now, you can use this to publish the reobf jar under its own classifier (which dependants would need to specify): publishing {
publications {
register<MavenPublication>("maven") {
from(components["java"])
artifact(tasks.reobfJar) {
classifier = "reobf"
}
}
}
}If you want reobf to be selected automatically you would need to remove the java components line, due to how Gradle selects variants. After #177, something better can be worked on for publishing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When maven publish plugin is present on userdev projects
a normal publish results into a wrong module file in maven repository.
This commit adds the missing reobfuscated jars to this module file.
The initial issue is that depending on the reobfuscated plugin dependency results into loading the dev dependency because no reobfuscated one is defined in the module file.
Example:
before that change: https://eldonexus.de/repository/maven-releases/com/github/yannicklamprecht/worldborderapi/1.181.1/worldborderapi-1.181.1.module
after that change: https://eldonexus.de/repository/maven-releases/com/github/yannicklamprecht/worldborderapi/1.181.2/worldborderapi-1.181.2.module
The diffs are the missing files in the two variants:
apiElementsandruntimeElements