Skip to content
Closed
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}"
}

// 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()
from components.java
}
}
Expand Down