如果傳遞庫不packaged與JAR
任務:什麼對脂肪JAR的gradle這個選擇嗎?
By default, jar task in gradle builds an executable jar file from your project source files. It will not contain any transitive libs that are needed for your program.
相反,Netbeans的確實包JAR
依賴或傳遞庫。而不是脂肪JAR
如何gradle這個包括庫?
plugins {
id 'com.gradle.build-scan' version '1.8'
id 'java'
id 'application'
}
mainClassName = 'net.bounceme.dur.mbaas.json.Main'
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
repositories {
jcenter()
}
jar {
manifest {
attributes 'Main-Class': 'net.bounceme.dur.mbaas.json.Main'
}
}
dependencies {
//compile fileTree(dir: 'libs', include: ['*.jar'])
runtime group: 'com.google.firebase', name: 'firebase-admin', version: '5.2.0'
compile fileTree(dir: 'lib', include: '*.jar')
}
有關
到another問題:什麼是「道」來包裝與JAR
任務,不會導致「肥胖JAR
」庫?
http://imperceptiblethoughts.com/shadow/ – Salem
你真的在問[如何用Gradle創建一個胖罐子](https://www.google.com/search?q=how+to +創建+ A +脂肪+罐+使用+搖籃和OQ =如何+創建+ A +脂肪+罐+使用+搖籃&AQS = chrome..69i57.133j0j7&的SourceID =鉻&即= UTF-8)?因爲「對於胖JAR來說,什麼是gradle替代物?」的答案?是「不要製造一個肥缸」。 –
都在這個脂肪JAR文件:http://paste.ubuntu.com/25048768/,而不是包括他們** **內脂肪JAR我想非脂肪JAR。但是,我也希望這些JAR在類路徑上。不只是在類路徑上,而是在他們自己的目錄中。我不知道的術語,但這樣的:https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html – Thufir