Created
August 30, 2024 21:42
-
-
Save PhoenixVX/6e60d3bf255d875825c259096bc649d6 to your computer and use it in GitHub Desktop.
build.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'java-library' | |
id 'maven-publish' | |
} | |
group = 'org.mcphackers' | |
archivesBaseName = 'launchwrapper' | |
sourceCompatibility = JavaVersion.VERSION_1_8 | |
targetCompatibility = JavaVersion.VERSION_1_8 | |
project.ext.asm_version = 9.6 | |
dependencies { | |
implementation 'org.mcphackers.rdi:rdi:1.0' | |
implementation "org.ow2.asm:asm:${project.asm_version}" | |
implementation "org.ow2.asm:asm-tree:${project.asm_version}" | |
implementation 'org.json:json:20230311' | |
// I'll bring discord RPC support later, when I have an environment to compile natives | |
testRuntimeOnly('org.junit.platform:junit-platform-launcher:1.5.2') | |
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.0.0' | |
} | |
test { | |
useJUnitPlatform() | |
testLogging { | |
exceptionFormat = 'full' | |
events = ["passed", "failed", "skipped"] | |
showStandardStreams = true | |
} | |
} | |
subprojects { | |
apply plugin: 'java' | |
apply plugin: 'maven-publish' | |
version = '1.0-SNAPSHOT' | |
repositories { | |
flatDir { | |
dirs "libs" | |
} | |
maven { | |
url "https://mcphackers.github.io/libraries/" | |
} | |
maven { | |
url "https://libraries.minecraft.net/" | |
} | |
mavenCentral() | |
} | |
task sourcesJar(type: Jar) { | |
archiveClassifier = 'sources' | |
from sourceSets.main.allSource | |
} | |
artifacts { | |
archives jar | |
archives sourcesJar | |
} | |
publishing { | |
publications { | |
mavenJava(MavenPublication) { | |
artifactId = archivesBaseName | |
artifact jar | |
artifact sourcesJar | |
} | |
} | |
repositories { | |
mavenLocal() | |
def ENV = System.getenv() | |
if (ENV.MAVEN_URL) { | |
maven { | |
url ENV.MAVEN_URL | |
if (ENV.MAVEN_USERNAME) { | |
credentials { | |
username ENV.MAVEN_USERNAME | |
password ENV.MAVEN_PASSWORD | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment