Projects
openEuler:24.03:SP1:Everything:64G
mongo-java-driver
_service:tar_scm:mongo-java-driver-gradle-local...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:mongo-java-driver-gradle-local-fixes.patch of Package mongo-java-driver
diff --git a/bson/build.gradle b/bson/build.gradle index 3afa8ae0e..aa8e6afa7 100644 --- a/bson/build.gradle +++ b/bson/build.gradle @@ -16,30 +16,19 @@ apply plugin: 'osgi' apply plugin: 'java' -apply plugin: 'org.kordamp.gradle.clirr' def configDir = new File(rootDir, 'config') archivesBaseName = 'bson' -clirr { - excludeFilter = new File("$configDir/clirr-exclude.yml") - baseline 'org.mongodb:bson:3.4.0' - failOnErrors = true -} jar { manifest { - instruction 'Build-Version', getGitVersion() instruction 'Import-Package', 'javax.xml.bind.*', 'org.slf4j;resolution:=optional' } } -modifyPom { - project { - name 'BSON' - description 'The BSON library' - url 'http://bsonspec.org' - } +sourceSets { + main { java.srcDirs = ['src/main'] } } diff --git a/build.gradle b/build.gradle index 2c67187b9..67aeb0d7d 100644 --- a/build.gradle +++ b/build.gradle @@ -31,12 +31,6 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } mavenLocal() } - dependencies { - classpath 'org.kordamp.gradle:clirr-gradle-plugin:0.2.2' - classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+' - classpath 'com.bmuschko:gradle-nexus-plugin:2.2' - classpath "gradle.plugin.com.github.spotbugs:gradlePlugin:1.6.0" - } } ////////////////////////////////////////// @@ -45,7 +39,6 @@ buildscript { configure(subprojects.findAll { it.name != 'util' }) { apply plugin: 'java' - apply plugin: 'optional-base' evaluationDependsOn(':util') @@ -61,7 +54,7 @@ configure(subprojects.findAll { it.name != 'util' }) { } dependencies { - compile 'org.slf4j:slf4j-api:1.7.6', optional + compile 'org.slf4j:slf4j-api:1.7.6' } /* Compiling */ @@ -113,168 +106,6 @@ configure(subprojects.findAll { it.name != 'util' }) { } } -def getGitVersion() { - def outputAsString - new ByteArrayOutputStream().withStream { os -> - def result = exec { - executable 'git' - args 'describe', '--tags', '--always', '--dirty' - standardOutput = os - } - outputAsString = os.toString().substring(1).trim() - } - return outputAsString -} - -configure(subprojects.findAll { it.name != 'util' && it.name != 'mongo-java-driver' }) { - apply plugin: 'checkstyle' - apply plugin: "com.github.spotbugs" - apply plugin: 'jacoco' - apply plugin: 'groovy' - apply plugin: 'codenarc' - - dependencies { - testCompile 'org.codehaus.groovy:groovy-all:2.4.12' - testCompile 'org.spockframework:spock-core:1.1-groovy-2.4' - testCompile 'cglib:cglib-nodep:2.2.2' - testCompile 'org.objenesis:objenesis:1.3' - testCompile 'org.hamcrest:hamcrest-all:1.3' - testCompile 'ch.qos.logback:logback-classic:1.1.1' - testCompile project(':util') //Adding categories to classpath - } - - sourceSets { - main { - java.srcDirs = ['src/main'] - } - test { - groovy.srcDirs = ['src/test/functional', 'src/test/unit'] - } - } - - /* Testing */ - tasks.withType(Test) { - maxHeapSize = "3g" - maxParallelForks = 1 - - systemProperties( - 'org.mongodb.test.uri': System.getProperty('org.mongodb.test.uri'), - 'org.mongodb.useSocket': System.getProperty('org.mongodb.useSocket', 'false'), - 'org.mongodb.disableAsync': System.getProperty('org.mongodb.disableAsync', 'false'), - 'org.mongodb.async.type': System.getProperty('org.mongodb.async.type', 'nio2'), - - 'javax.net.ssl.trustStore': System.getProperty('javax.net.ssl.trustStore'), - 'javax.net.ssl.keyStore': System.getProperty('javax.net.ssl.keyStore'), - 'javax.net.ssl.keyStorePassword': System.getProperty('javax.net.ssl.keyStorePassword'), - 'javax.net.ssl.trustStorePassword': System.getProperty('javax.net.ssl.trustStorePassword') - ) - - if (project.buildingWith('ssl.enabled')) { - systemProperties( - 'javax.net.ssl.keyStoreType': project.property('ssl.keyStoreType'), - 'javax.net.ssl.keyStore': project.property('ssl.keyStore'), - 'javax.net.ssl.keyStorePassword': project.property('ssl.keyStorePassword'), - 'javax.net.ssl.trustStoreType': project.property('ssl.trustStoreType'), - 'javax.net.ssl.trustStore': project.property('ssl.trustStore'), - 'javax.net.ssl.trustStorePassword': project.property('ssl.trustStorePassword') - ) - } - - if (project.buildingWith('gssapi.enabled')) { - systemProperties( - 'sun.security.krb5.debug': project.getProperty('sun.security.krb5.debug'), - 'javax.security.auth.useSubjectCredsOnly': "false", - 'java.security.krb5.kdc': project.getProperty('krb5.kdc'), - 'java.security.krb5.realm': project.getProperty('krb5.realm'), - 'java.security.auth.login.config': project.getProperty('auth.login.config'), - ) - } - - useJUnit { - if (!project.buildingWith('rs.enabled')) { - excludeCategories 'category.ReplicaSet' - } - if (project.buildingWith('quicktest')) { - excludeCategories 'category.SlowUnit' - } - if (project.buildingWith('travistest')) { - excludeCategories 'category.SlowUnit', 'category.Slow' - } - } - - jacoco { enabled = false } - - testLogging { exceptionFormat = 'full' } - } - - task testSlowUnit(type: Test) { - useJUnit { - includeCategories 'category.SlowUnit' - } - } - - gradle.taskGraph.whenReady { taskGraph -> - if (taskGraph.hasTask(testCoverage)) { - tasks.withType(Test) { jacoco { enabled = true } } - } - } - - task testCoverage(dependsOn: test) - - /* Code quality */ - - checkstyle { - toolVersion = "7.4" - configFile = new File(configDir, 'checkstyle.xml') - configProperties.checkstyleConfigDir = configDir - } - - spotbugs { - excludeFilter = new File(configDir, 'findbugs-exclude.xml') - sourceSets = [sourceSets.main] - toolVersion = '3.1.0' - } - - codenarc { - toolVersion = '1.0' - reportFormat = project.buildingWith('xmlReports.enabled') ? 'xml' : 'html' - } - - tasks.withType(com.github.spotbugs.SpotBugsTask) { - reports { - xml.enabled = project.buildingWith('xmlReports.enabled') - html.enabled = !project.buildingWith('xmlReports.enabled') - } - } - - tasks.withType(Test) { - def jdkHome = findProperty("jdkHome") - if (jdkHome) { - def javaExecutablesPath = new File(jdkHome, 'bin') - def javaExecutables = [:].withDefault { execName -> - def executable = new File(javaExecutablesPath, execName) - assert executable.exists() : "There is no ${execName} executable in ${javaExecutablesPath}" - executable - } - executable = javaExecutables.java - } - } -} - -task docs(type: Javadoc) { - destinationDir = new File(projectDir, 'build/docs') - options { options -> setJavaDocOptions(options) } - subprojects.grep({ it.name != 'util' }).each { proj -> - proj.tasks.withType(Javadoc).each { javadocTask -> - source += javadocTask.source - classpath += javadocTask.classpath - excludes += javadocTask.excludes - includes += javadocTask.includes - dependsOn +=javadocTask.dependsOn - } - } -} - def setJavaDocOptions(MinimalJavadocOptions options) { options.author = true options.version = true @@ -333,6 +164,3 @@ gradle.buildFinished { BuildResult result -> } } -apply from: 'gradle/deploy.gradle' -apply from: 'gradle/TestColorOutput.gradle' - diff --git a/driver-async/build.gradle b/driver-async/build.gradle index 8c38cb20b..f6ca17d19 100644 --- a/driver-async/build.gradle +++ b/driver-async/build.gradle @@ -15,13 +15,12 @@ */ apply plugin: 'osgi' -apply plugin: 'org.kordamp.gradle.clirr' def configDir = new File(rootDir, 'config') archivesBaseName = 'mongodb-driver-async' sourceSets { - test.groovy.srcDirs += 'src/examples' + test.java.srcDirs += 'src/examples' } dependencies { @@ -32,12 +31,6 @@ dependencies { testCompile project(':driver-core').sourceSets.test.output } -clirr { - excludeFilter = new File("$configDir/clirr-exclude.yml") - baseline 'org.mongodb:mongodb-driver-async:3.4.0' - failOnErrors = false -} - tasks.withType(Checkstyle) { // needed so the Javadoc checks can find the code in other modules classpath = files(project(':driver-core').sourceSets.main.output, sourceSets.main.output) @@ -45,7 +38,6 @@ tasks.withType(Checkstyle) { jar { manifest { - instruction 'Build-Version', getGitVersion() instruction 'Import-Package', 'org.bson.*', 'com.mongodb.*', @@ -53,10 +45,6 @@ jar { } } -modifyPom { - project { - name 'MongoDB Asynchronous Driver' - description 'The MongoDB Asynchronous Driver' - url 'http://www.mongodb.org' - } +sourceSets { + main { java.srcDirs = ['src/main'] } } diff --git a/driver-core/build.gradle b/driver-core/build.gradle index bf516508e..6db365b1b 100644 --- a/driver-core/build.gradle +++ b/driver-core/build.gradle @@ -15,31 +15,23 @@ */ apply plugin: 'osgi' -apply plugin: 'org.kordamp.gradle.clirr' def configDir = new File(rootDir, 'config') archivesBaseName = 'mongodb-driver-core' -clirr { - excludeFilter = new File("$configDir/clirr-exclude.yml") - baseline 'org.mongodb:mongodb-driver-core:3.4.0' - failOnErrors = false -} - dependencies { compile project(':bson') - compile "io.netty:netty-buffer:$nettyVersion", optional - compile "io.netty:netty-transport:$nettyVersion", optional - compile "io.netty:netty-handler:$nettyVersion", optional - compile "org.xerial.snappy:snappy-java:$snappyVersion", optional + compile "io.netty:netty-buffer:$nettyVersion" + compile "io.netty:netty-transport:$nettyVersion" + compile "io.netty:netty-handler:$nettyVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" testCompile project(':bson').sourceSets.test.output } jar { manifest { - instruction 'Build-Version', getGitVersion() instruction 'Import-Package', 'org.bson.*', // unfortunate that this is necessary, but if it's left out then it's not included 'javax.crypto.*', @@ -56,11 +48,6 @@ jar { } } -modifyPom { - project { - name 'MongoDB Java Driver Core' - description 'The Java operations layer for the MongoDB Java Driver. Third parties can \' +\n' + - ' \'wrap this layer to provide custom higher-level APIs' - url 'http://www.mongodb.org' - } +sourceSets { + main { java.srcDirs = ['src/main'] } } diff --git a/driver/build.gradle b/driver/build.gradle index 9b689bad0..473f4973b 100644 --- a/driver/build.gradle +++ b/driver/build.gradle @@ -14,13 +14,11 @@ * limitations under the License. */ -apply plugin: 'org.kordamp.gradle.clirr' - archivesBaseName = 'mongodb-driver' def configDir = new File(rootDir, 'config') sourceSets { - test.groovy.srcDirs += ['src/examples'] + test.java.srcDirs += ['src/examples'] } test { @@ -35,21 +33,12 @@ dependencies { testCompile project(':driver-core').sourceSets.test.output } -clirr { - excludeFilter = new File("$configDir/clirr-exclude.yml") - baseline 'org.mongodb:mongodb-driver:3.4.0' - failOnErrors = false -} tasks.withType(Checkstyle) { // needed so the Javadoc checks can find the code in other modules classpath = files(project(':driver-core').sourceSets.main.output, sourceSets.main.output) } -modifyPom { - project { - name 'MongoDB Driver' - description 'The MongoDB Driver' - url 'http://www.mongodb.org' - } +sourceSets { + main { java.srcDirs = ['src/main'] } } diff --git a/mongo-java-driver/build.gradle b/mongo-java-driver/build.gradle index 72973a33c..d8f2b4909 100644 --- a/mongo-java-driver/build.gradle +++ b/mongo-java-driver/build.gradle @@ -27,10 +27,10 @@ idea { // dependencies copied from driver-core dependencies { - compile "io.netty:netty-buffer:$nettyVersion", optional - compile "io.netty:netty-transport:$nettyVersion", optional - compile "io.netty:netty-handler:$nettyVersion", optional - compile "org.xerial.snappy:snappy-java:$snappyVersion", optional + compile "io.netty:netty-buffer:$nettyVersion" + compile "io.netty:netty-transport:$nettyVersion" + compile "io.netty:netty-handler:$nettyVersion" + compile "org.xerial.snappy:snappy-java:$snappyVersion" } // srcDirs copied as well, so everything is compiled twice @@ -45,7 +45,6 @@ sourceSets { // copied from driver-core jar { manifest { - instruction 'Build-Version', getGitVersion() instruction 'Import-Package', 'javax.xml.bind.*', 'javax.crypto.*', @@ -61,12 +60,4 @@ jar { 'org.xerial.snappy.*;resolution:=optional', 'org.slf4j;resolution:=optional' } - } - -modifyPom { - project { - name 'MongoDB Java Driver' - description 'The MongoDB Java Driver uber-artifact, containing mongodb-driver, mongodb-driver-core, and bson' - url 'http://www.mongodb.org' - } } diff --git a/util/build.gradle b/util/build.gradle index ba3d0e444..da4b4c7fa 100644 --- a/util/build.gradle +++ b/util/build.gradle @@ -19,6 +19,9 @@ apply plugin: 'java' sourceCompatibility = '1.6' targetCompatibility = '1.6' +group = 'org.mongodb' +archivesBaseName = 'mongodb-javadoc-utils' + dependencies { compile files("${System.getProperty('java.home')}/../lib/tools.jar") }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2