Skip to content

Commit

Permalink
updated loom, added stuff for publishing with jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Oct 24, 2024
1 parent 8cc3dd9 commit f58455c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
21 changes: 21 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pipeline {
agent any
tools {
jdk "jdk-17" // valid options are: "jdk-8", "jdk-16", "jdk-17" or "jdk-21", choose which one you need
}
stages {
stage('Clean') {
steps {
echo 'Cleaning Project'
sh 'chmod +x gradlew'
sh './gradlew clean'
}
}
stage('Build & Publish') {
steps {
echo 'Building & Publishing'
sh './gradlew build publish'
}
}
}
}
18 changes: 7 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import org.gradle.jvm.toolchain.JavaLanguageVersion

plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
def isCI = System.getenv("CI")

repositories {
maven { url = "https://mvn.devos.one/snapshots/" }
Expand Down Expand Up @@ -68,13 +68,9 @@ publishing {
}

repositories {
if (isCI && isRELEASE) {
if (isCI) {
maven {
url = "https://repo.repsy.io/mvn/trinsdar/trins-mods/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
url System.getenv("local_maven_url")
}
} else {
mavenLocal()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit f58455c

Please sign in to comment.