Hi,
I have generated jar file with below task. and this jar file I will be using as a local jar to another project.
jar {
from('src/main/resources') {
include '*.properties'
}
manifest {
attributes(
'Main-Class': "main",
'Built-By' : System.properties['user.name'],
'Build-Timestamp': new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Build-Revision' : versioning.info.commit,
'Created-By' : "Gradle ${gradle.gradleVersion}",
'Build-Jdk' : "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS' : "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}",
"Class-Path": configurations.compile.collect { it.getName() }.join(' ')
)
}
}
I have added as dependency in build.gradle in another gradle project as below
compile files('libs/abc-0.0.10-SNAPSHOT.jar')
However, it is not downloading dependancies from mavencentral present in the jar. I have to all dependencies again in new gradle project.
So am I missing anything while creating jar?? or do i need to add any configurations to download from maven central??
Please Note: ** I don’t want to create fat jar**, as the size of jar is huge.