Skip to content

Commit 216c69a

Browse files
committed
JAVA-1857, JAVA-1998: Rolling back the changed introduced by JAVA-1857, which caused the regression described in JAVA-1998.
1 parent e0c8bd1 commit 216c69a

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

mongo-java-driver/build.gradle

+19-13
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,29 @@ apply plugin: 'osgi'
2121

2222
archivesBaseName = 'mongo-java-driver'
2323

24-
task init() << {
25-
new File("${project.rootDir}/${archivesBaseName}/build/classes/main").mkdirs()
24+
idea {
25+
module {
26+
sourceDirs = [] // Ignore in idea (prevents intellij crashing due to sources outside project dir)
27+
}
28+
}
29+
30+
// dependencies copied from driver-core
31+
dependencies {
32+
compile "io.netty:netty-buffer:$nettyVersion", optional
33+
compile "io.netty:netty-transport:$nettyVersion", optional
34+
compile "io.netty:netty-handler:$nettyVersion", optional
2635
}
2736

28-
def getJar(name) {
29-
project(name).jar.archivePath
37+
// srcDirs copied as well, so everything is compiled twice
38+
sourceSets {
39+
main {
40+
java {
41+
srcDirs = ["$rootDir/driver/src/main", "$rootDir/driver-core/src/main", "$rootDir/bson/src/main"]
42+
}
43+
}
3044
}
3145

46+
// copied from driver-core
3247
jar {
3348
manifest {
3449
instruction 'Import-Package',
@@ -44,16 +59,7 @@ jar {
4459
'io.netty.*;resolution:=optional',
4560
'org.slf4j;resolution:=optional'
4661
}
47-
from(zipTree(getJar(":driver-core"))) {
48-
exclude("META-INF")
49-
}
50-
from(zipTree(getJar(":driver"))) {
51-
exclude("META-INF")
52-
}
53-
from(zipTree(getJar(":bson"))) {
54-
exclude("META-INF")
5562
}
56-
}.dependsOn("init")
5763

5864
modifyPom {
5965
project {

0 commit comments

Comments
 (0)