Skip to content

Commit 0dc8314

Browse files
committed
Adding log4j jar in the compiled jar.
1 parent a8a8656 commit 0dc8314

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@ plugins {
1111
id 'java-library'
1212
}
1313

14+
configurations {
15+
// configuration that holds jars to include in the jar
16+
extraLibs
17+
}
18+
1419
dependencies {
1520
// These dependency is used internally, and not exposed to consumers on their own compile classpath.
1621
implementation files('lib/log4j.jar')
1722
implementation project('RejigInterface')
1823

24+
extraLibs files('lib/log4j.jar')
25+
1926
// Use JUnit test framework
2027
testImplementation 'junit:junit:4.12'
2128
}
@@ -27,6 +34,12 @@ repositories {
2734
jcenter()
2835
}
2936

37+
jar {
38+
from {
39+
configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
40+
}
41+
}
42+
3043
// Run tests as tasks
3144
task memcachedBench(type: JavaExec) {
3245
main = 'edu.usc.cs550.rejig.client.test.MemcachedBench'

0 commit comments

Comments
 (0)