Skip to content

Commit

Permalink
Add maven publish back
Browse files Browse the repository at this point in the history
  • Loading branch information
thecatcore committed Dec 14, 2023
1 parent 54383ff commit 1237827
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java'
id 'xyz.wagyourtail.unimined' version '1.1.1-SNAPSHOT'
id "maven-publish"
}

group project.maven_group
Expand Down Expand Up @@ -72,6 +73,14 @@ dependencies {
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}" }
}
}

tasks.withType(JavaCompile).configureEach {
Expand All @@ -83,4 +92,19 @@ tasks.withType(JavaCompile).configureEach {
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = 8
}
}

// Configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// Select the repositories you want to publish to
repositories {
// Uncomment to publish to the local maven
// mavenLocal()
}
}

0 comments on commit 1237827

Please sign in to comment.