78 lines
1.4 KiB
Groovy
78 lines
1.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
repositories {
|
|
flatDir {
|
|
dirs "libs"
|
|
}
|
|
maven {
|
|
url "https://mcphackers.github.io/libraries/"
|
|
}
|
|
maven {
|
|
url "https://libraries.minecraft.net/"
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
group = 'org.mcphackers'
|
|
archivesBaseName = 'launchwrapper'
|
|
version = '1.0-SNAPSHOT'
|
|
sourceCompatibility = 1.5
|
|
targetCompatibility = 1.5
|
|
|
|
dependencies {
|
|
implementation 'org.mcphackers.rdi:rdi:1.0'
|
|
implementation 'org.ow2.asm:asm:9.3'
|
|
implementation 'org.ow2.asm:asm-tree:9.3'
|
|
implementation 'org.json:json:20230311'
|
|
// I'll bring discord RPC support later, when I have an environment to compile natives
|
|
|
|
testCompileOnly 'junit:junit:4.12'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.0.0'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
workingDir = "build"
|
|
testLogging.showStandardStreams = true
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|