2019-10-31 21:43:47 -04:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2022-06-18 18:21:20 -04:00
|
|
|
mavenCentral()
|
|
|
|
gradlePluginPortal()
|
2019-10-31 21:43:47 -04:00
|
|
|
}
|
|
|
|
dependencies {
|
2022-06-18 18:21:20 -04:00
|
|
|
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
|
2019-10-31 21:43:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-24 04:48:34 -04:00
|
|
|
plugins {
|
|
|
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
|
|
|
id 'java'
|
|
|
|
}
|
2019-10-31 21:43:47 -04:00
|
|
|
|
2024-01-15 13:57:48 -05:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
|
2019-10-31 21:43:47 -04:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes "Main-Class": "com.baeldung.fatjar.Application"
|
|
|
|
}
|
|
|
|
|
|
|
|
from {
|
2022-06-13 15:31:44 -04:00
|
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
2019-10-31 21:43:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task customFatJar(type: Jar) {
|
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': 'com.baeldung.fatjar.Application'
|
|
|
|
}
|
2023-10-24 04:48:34 -04:00
|
|
|
archiveBaseName = 'all-in-one-jar'
|
2022-06-13 15:31:44 -04:00
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
2019-10-31 21:43:47 -04:00
|
|
|
with jar
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dependencies{
|
2022-06-13 15:31:44 -04:00
|
|
|
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
|
|
|
|
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
|
|
|
|
}
|