Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect the archivesName #46

Open
wants to merge 5 commits into
base: 1.21
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
}

base {
archivesName = mod_id
archivesName = "${name}-${minecraft_version}"
Shadows-of-Fire marked this conversation as resolved.
Show resolved Hide resolved
}

// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
Expand Down Expand Up @@ -124,9 +124,13 @@ tasks.withType(ProcessResources).configureEach {
}

// Example configuration to allow publishing using the maven-publish plugin
java {
withSourcesJar()
}
Comment on lines +127 to +129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this above the comment (which is for the publishling block), and add its own comment explaining that this enables the creation of the -sources JAR.

publishing {
publications {
register('mavenJava', MavenPublication) {
artifactId = project.base.archivesName.get()
sciwhiz12 marked this conversation as resolved.
Show resolved Hide resolved
from components.java
}
}
Expand Down