Skip to content

Commit

Permalink
Publish sources jar
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Nov 8, 2023
1 parent 6c62890 commit f5fa1d6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
30 changes: 19 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
id "org.jetbrains.kotlin.jvm" version "1.9.+"
}

def ENV = System.getenv()

version = mod_version
group = maven_group

Expand Down Expand Up @@ -71,20 +73,26 @@ jar {
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact(remapJar) {
builtBy(remapJar)
}

artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}

def ENV = System.getenv()
if (ENV.MAVEN_URL) {
repositories.maven {
url ENV.MAVEN_URL
allowInsecureProtocol = true
if (ENV.MAVEN_USERNAME) {
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
}
repositories {
// Andante's Maven
def mavenUsername = ENV["MAVEN_USERNAME_ANDANTE"]
def mavenPassword = ENV["MAVEN_PASSWORD_ANDANTE"]
if (mavenUsername && mavenPassword) {
maven {
name = "Andante"
url = "https://maven.andante.dev/releases/"
credentials.username = mavenUsername
credentials.password = mavenPassword
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ fabric_kotlin_version=1.10.10+kotlin.1.9.10
kache_version=1.0.5

# Mod Properties
mod_version=2.1.2
mod_version=2.1.3
maven_group=dev.andante

0 comments on commit f5fa1d6

Please sign in to comment.