Skip to content

Commit

Permalink
update gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumper251 committed Sep 8, 2024
1 parent 5d77d2e commit efbab42
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
33 changes: 18 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
plugins {
id 'java'
id 'com.gradleup.shadow' version '8.3.0'
id 'maven-publish'
}

group = 'me.jumper251'
version = '1.8.9'

repositories {
mavenCentral()
Expand All @@ -28,27 +27,31 @@ dependencies {
}

allprojects {
group = 'me.jumper251.replay'
version = '1.8.9'

apply plugin: 'java'
apply plugin: 'maven-publish'

def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}

tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

compileJava {
options.encoding("UTF-8")
}

publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
}
}
}
}

shadowJar {
Expand Down
4 changes: 4 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
before_install:
- sdk update
- sdk install java 21-zulu
- sdk use java 21-zulu

0 comments on commit efbab42

Please sign in to comment.