-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Justin Lee
committed
Sep 19, 2013
1 parent
e970072
commit f1051d7
Showing
9 changed files
with
479 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
configure(subprojects) { | ||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
|
||
group = 'org.mongodb.morphia' | ||
version = '0.106-SNAPSHOT' | ||
|
||
sourceCompatibility = '1.5' | ||
targetCompatibility = '1.5' | ||
|
||
configurations { | ||
compileOnly | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
testCompile 'org.junit:junit:4.11' | ||
compile 'org.mongodb:mongo-java-driver:[2.10.1,3.0.0)' | ||
} | ||
|
||
sourceSets.main.compileClasspath += configurations.compileOnly | ||
sourceSets.test.compileClasspath += configurations.compileOnly | ||
} | ||
|
||
project(':morphia') { | ||
dependencies { | ||
compileOnly 'cglib:cglib-nodep:[2.1_3,3.0)' | ||
compileOnly 'com.thoughtworks.proxytoys:proxytoys:1.0' | ||
} | ||
} | ||
|
||
project(':validation') { | ||
dependencies { | ||
compile 'javax.validation:validation-api:1.0.0.GA' | ||
compile project(':morphia') | ||
} | ||
} | ||
|
||
project(':entityscanner-plug') { | ||
dependencies { | ||
compile('org.reflections:reflections:0.9.8') { | ||
'servlet-api:javax.servlet' | ||
'com.google.code.gson:gson' | ||
'logback-classic:ch.qos.logback' | ||
'xml-apis:xml-apis' | ||
} | ||
compile 'com.google.collections:google-collections:1.0' | ||
compile('net.sf.scannotation:scannotation:1.0.2') { | ||
'javassist:javassist' | ||
} | ||
testCompile 'org.slf4j:slf4j-simple:1.5.6' | ||
compile project(':morphia') | ||
} | ||
} | ||
|
||
project(':guice-plug') { | ||
dependencies { | ||
compileOnly 'com.google.inject:guice:3.0' | ||
compile project(':morphia') | ||
} | ||
} | ||
|
||
project(':jrebel-plug') {} | ||
|
||
project(':gwt') { | ||
sourceSets { | ||
main { | ||
java { srcDirs = [] } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* | ||
* Copyright (c) 2008 - 2013 MongoDB, Inc. <http://MongoDB.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
allprojects { | ||
apply plugin: 'idea' | ||
apply plugin: 'eclipse' | ||
} | ||
|
||
project('morphia') { | ||
idea.module { | ||
iml { | ||
withXml { provider -> | ||
|
||
def node = provider.node.component.find { it.@name == 'CheckStyle-IDEA-Module' } | ||
if (node == null) { | ||
node = provider.node.appendNode('component') | ||
} | ||
node.replaceNode { | ||
component(name: 'CheckStyle-IDEA-Module') { | ||
option(name: 'configuration') { | ||
map { | ||
entry(key: 'active-configuration', value: 'FILE:$PROJECT_DIR$/config/checkstyle-lite.xml:Lite') | ||
} | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
|
||
idea { | ||
project { | ||
languageLevel = '1.5' | ||
ipr { | ||
withXml { provider -> | ||
def mapping = provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping | ||
mapping.@vcs = 'Git' | ||
mapping.@directory = '$PROJECT_DIR$' | ||
|
||
def node = provider.node.component.find { it.@name == 'CheckStyle-IDEA-Module' } ?: provider.node.appendNode('component') | ||
node.replaceNode { | ||
component(name: 'CheckStyle-IDEA') { | ||
option(name: 'configuration') { | ||
map { | ||
entry(key: 'active-configuration', value: 'FILE:$PROJECT_DIR$/config/checkstyle.xml:Default') | ||
entry(key: 'check-test-classes', value: true) | ||
entry(key: 'check-nonjava-files', value: false) | ||
entry(key: 'location-0', value: 'FILE:$PROJECT_DIR$/config/checkstyle.xml:Default') | ||
entry(key: 'location-1', value: 'FILE:$PROJECT_DIR$/config/checkstyle-lite.xml:Lite') | ||
} | ||
} | ||
} | ||
} | ||
|
||
node = provider.node.component.find { it.@name == 'CopyrightManager' } ?: provider.node.appendNode('component') | ||
node.replaceNode { | ||
component(name: 'CopyrightManager', default: 'MongoDB') { | ||
copyright { | ||
option(name: 'notice', value: 'Copyright (c) 2008 - \$today.year MongoDB, ' + | ||
'Inc. <http://mongodb.com>\n\nLicensed under the Apache License, ' + | ||
'Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.') | ||
option(name: 'keyword', value: 'Copyright') | ||
option(name: 'allowReplaceKeyword', value: '') | ||
option(name: 'myName', value: 'MongoDB') | ||
option(name: 'myLocal', value: true) | ||
} | ||
module2copyright { | ||
element(module: 'Project Files', copyright: 'MongoDB') | ||
} | ||
LanguageOptions(name: 'XML') { | ||
option(name: 'fileTypeOverride', value: 1) | ||
option(name: 'prefixLines', value: false) | ||
} | ||
} | ||
} | ||
} | ||
beforeMerged { project -> | ||
project.modulePaths.clear() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
configure { | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
/* Artifacts */ | ||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
from javadoc | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
|
||
signing { | ||
required { gradle.taskGraph.hasTask('uploadArchives') } | ||
sign configurations.archives | ||
} | ||
|
||
project.ext.mavenDeployers = [] | ||
|
||
def pom = { config -> | ||
project.mavenDeployers*.pom config | ||
} | ||
|
||
install { | ||
project.mavenDeployers << repositories.mavenInstaller | ||
} | ||
|
||
uploadArchives { | ||
project.mavenDeployers << repositories.mavenDeployer { | ||
def sonatypeCredentials = [ | ||
userName: project.properties.sonatypeUsername, | ||
password: project.properties.sonatypePassword | ||
] | ||
|
||
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots') { | ||
authentication(sonatypeCredentials) | ||
} | ||
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(sonatypeCredentials) | ||
} | ||
} | ||
} | ||
|
||
pom { | ||
project { | ||
scm { | ||
url 'https://github.com/mongodb/morphia.git' | ||
connection 'scm:git:https://github.com/mongodb/morphia.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
name 'Various' | ||
organization = 'MongoDB' | ||
} | ||
} | ||
} | ||
|
||
whenConfigured { resultPom -> | ||
resultPom.dependencies.removeAll { dep -> dep.scope != 'compile' } | ||
resultPom.dependencies*.scope = null | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
configure { | ||
apply plugin: 'osgi' | ||
} | ||
|
||
project(':morphia') { | ||
jar { | ||
manifest { | ||
attributes( | ||
'Bundle-License': 'http://www.apache.org/licenses/LICENSE-2.0.txt', | ||
'Bundle-Name': 'MongoDB Java Driver', | ||
'Bundle-SymbolicName': 'org.mongodb.mongodb-driver', | ||
'Import-Package': 'javax.management, javax.net, javax.net.ssl', | ||
|
||
) | ||
} | ||
} | ||
|
||
uberJar { | ||
manifest = jar.manifest //not sure, may be we need to include 'Export-Package' from :bson as well | ||
} | ||
} | ||
|
||
project(':driver-compat') { | ||
jar { | ||
manifest { | ||
attributes( | ||
'Bundle-License': 'http://www.apache.org/licenses/LICENSE-2.0.txt', | ||
'Bundle-Name': 'MongoDB Java Driver', | ||
'Bundle-SymbolicName': 'org.mongodb.mongo-java-driver', | ||
'Import-Package': 'javax.management, javax.net, javax.net.ssl' | ||
) | ||
} | ||
} | ||
|
||
uberJar { | ||
manifest = jar.manifest | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Mon Aug 12 18:31:08 FET 2013 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip |
Oops, something went wrong.