File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,29 +21,14 @@ apply plugin: 'osgi'
2121
2222archivesBaseName = ' mongo-java-driver'
2323
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
24+ task init () << {
25+ new File (" ${ project.rootDir} /${ archivesBaseName} /build/classes/main" ). mkdirs()
3526}
3627
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- }
28+ def getJar (name ) {
29+ project(name). jar. archivePath
4430}
4531
46- // copied from driver-core
4732jar {
4833 manifest {
4934 instruction ' Import-Package' ,
5944 ' io.netty.*;resolution:=optional' ,
6045 ' org.slf4j;resolution:=optional'
6146 }
62- }
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" )
55+ }
56+ }. dependsOn(" init" )
6357
6458modifyPom {
6559 project {
You can’t perform that action at this time.
0 commit comments