1
I’m using the plugin johnrengelman / shadow to create a Uber with some local dependencies, but for some reason unknown is not working.
build.Gradle
/*
* This file was generated by the Gradle 'init' task.
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}
}
plugins {
id 'java'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
repositories {
mavenLocal()
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
url = 'https://repo.bukkit.org/content/groups/public/'
}
maven {
url = 'https://repo.maven.apache.org/maven2'
}
}
shadowJar {
archiveBaseName = "uber"
classifier = ''
archiveVersion = '1.0.0-SNAPSHOT'
}
dependencies {
compileOnly fileTree(dir: 'lib', include: 'minecraft-colors-*.jar')
shadow fileTree(dir: 'lib', include: 'knautiluz-http-*.jar')
shadow fileTree(dir: 'lib', include: 'knautiluz-http-services-*.jar')
testImplementation 'junit:junit:4.8.1'
testImplementation 'org.mockito:mockito-all:1.9.5'
compileOnly 'org.spigotmc:spigot-api:1.15.1-R0.1-SNAPSHOT'
}
group = 'com.knautiluz.lorelei'
version = '1.0.0-SNAPSHOT'
description = 'Knautiluz Verify'
sourceCompatibility = '1.8'
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
With the commands gradle build
and gradle shadowJar
the created jars are practically the same, and do not load the mentioned dependencies