Skip to content
Browse files

project layout refactoring

  • Loading branch information...
1 parent 9e824ec commit 04ea7e24404eae1ccdf46de2a1b2fe376180ac52 @leonlee committed Dec 19, 2012
Showing with 39 additions and 9 deletions.
  1. +6 −5 build.gradle
  2. 0 common/gradle.properties
  3. +2 −0 modules/sys-auth/build.gradle
  4. +1 −0 modules/sys-auth/gradle.properties
  5. +2 −0 platform/common/build.gradle
  6. +1 −0 platform/common/gradle.properties
  7. 0 { → platform}/common/src/main/groovy/org/riderzen/ogs/common/BaseModel.groovy
  8. +1 −1 { → platform}/common/src/main/groovy/org/riderzen/ogs/common/DBHelper.groovy
  9. 0 { → platform}/common/src/main/groovy/org/riderzen/ogs/common/E.groovy
  10. 0 { → platform}/common/src/main/groovy/org/riderzen/ogs/common/ModelException.groovy
  11. 0 { → platform}/common/src/main/groovy/org/riderzen/ogs/common/NoPropertyFoundException.groovy
  12. 0 { → platform}/protocol/build.gradle
  13. +1 −0 platform/protocol/gradle.properties
  14. 0 { → platform}/protocol/src/main/groovy/org/riderzen/ogs/protocol/ProtocolParser.groovy
  15. 0 {protocol/src/test → platform/protocol/src/main}/resources/log4j.properties
  16. 0 { → platform}/protocol/src/main/resources/mod.json
  17. 0 { → platform}/protocol/src/test/groovy/org/riderzen/ogs/protocol/ProtocolParserTest.groovy
  18. 0 { → platform}/protocol/src/test/resources/deployer.js
  19. 0 { → platform}/protocol/src/test/resources/langs.properties
  20. 0 {protocol/src/main → platform/protocol/src/test}/resources/log4j.properties
  21. 0 { → platform}/tcp-server/build.gradle
  22. +1 −0 platform/tcp-server/gradle.properties
  23. 0 { → platform}/tcp-server/src/main/groovy/org/riderzen/ogs/tcp/TcpServer.groovy
  24. 0 { → platform}/tcp-server/src/main/resources/mod.json
  25. 0 { → platform}/tcp-server/src/main/scripts/tcpServer.groovy
  26. +0 −1 protocol/gradle.properties
  27. +24 −1 settings.gradle
  28. +0 −1 tcp-server/gradle.properties
View
11 build.gradle
@@ -1,7 +1,10 @@
-subprojects {
+def emptyProjects = ['modules', 'platform',]
+
+configure(subprojects.findAll { project -> !emptyProjects.find {it == project.name} }) {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
+
group = 'org.riderzen.ogs'
sourceCompatibility = '1.7'
@@ -98,10 +101,8 @@ subprojects {
}
}
-configure(subprojects.findAll {it.name != 'common'}) {
+configure(subprojects.findAll { project -> project.path != ':platform:common' && !emptyProjects.find { it == project.name}}) {
dependencies {
- compile project(':common')
+ compile project(':platform:common')
}
}
-
-
View
0 common/gradle.properties
No changes.
View
2 modules/sys-auth/build.gradle
@@ -0,0 +1,2 @@
+configure(subprojects.findAll {true}) {
+}
View
1 modules/sys-auth/gradle.properties
@@ -0,0 +1 @@
+modulename=org.riderzen.ogs.mod.sys.auth
View
2 platform/common/build.gradle
@@ -0,0 +1,2 @@
+dependencies {
+}
View
1 platform/common/gradle.properties
@@ -0,0 +1 @@
+modulename=org.riderzen.ogs.plat.common
View
0 .../org/riderzen/ogs/common/BaseModel.groovy → .../org/riderzen/ogs/common/BaseModel.groovy
File renamed without changes.
View
2 ...y/org/riderzen/ogs/common/DBHelper.groovy → ...y/org/riderzen/ogs/common/DBHelper.groovy
@@ -51,7 +51,7 @@ class DBHelper {
whereClause = "${model.primaryKeys[0]}=:id"
params.put('id', model.getProperty(model.primaryKeys[0]))
}
- def row = sql.firstRow("select * from ${tableName} $whereClause", params)
+ def row = sql.firstRow("select * from ${model.tableName} $whereClause", params)
model.pAttributes().each { key, value ->
model[key] = row[key]
View
0 ...n/groovy/org/riderzen/ogs/common/E.groovy → ...n/groovy/org/riderzen/ogs/common/E.groovy
File renamed without changes.
View
0 ...riderzen/ogs/common/ModelException.groovy → ...riderzen/ogs/common/ModelException.groovy
File renamed without changes.
View
0 ...gs/common/NoPropertyFoundException.groovy → ...gs/common/NoPropertyFoundException.groovy
File renamed without changes.
View
0 protocol/build.gradle → platform/protocol/build.gradle
File renamed without changes.
View
1 platform/protocol/gradle.properties
@@ -0,0 +1 @@
+modulename=org.riderzen.ogs.plat.protocol
View
0 ...derzen/ogs/protocol/ProtocolParser.groovy → ...derzen/ogs/protocol/ProtocolParser.groovy
File renamed without changes.
View
0 protocol/src/test/resources/log4j.properties → ...tocol/src/main/resources/log4j.properties
File renamed without changes.
View
0 protocol/src/main/resources/mod.json → ...form/protocol/src/main/resources/mod.json
File renamed without changes.
View
0 ...en/ogs/protocol/ProtocolParserTest.groovy → ...en/ogs/protocol/ProtocolParserTest.groovy
File renamed without changes.
View
0 protocol/src/test/resources/deployer.js → ...m/protocol/src/test/resources/deployer.js
File renamed without changes.
View
0 protocol/src/test/resources/langs.properties → ...tocol/src/test/resources/langs.properties
File renamed without changes.
View
0 protocol/src/main/resources/log4j.properties → ...tocol/src/test/resources/log4j.properties
File renamed without changes.
View
0 tcp-server/build.gradle → platform/tcp-server/build.gradle
File renamed without changes.
View
1 platform/tcp-server/gradle.properties
@@ -0,0 +1 @@
+modulename=org.riderzen.ogs.plat.tcp.server
View
0 ...ovy/org/riderzen/ogs/tcp/TcpServer.groovy → ...ovy/org/riderzen/ogs/tcp/TcpServer.groovy
File renamed without changes.
View
0 tcp-server/src/main/resources/mod.json → ...rm/tcp-server/src/main/resources/mod.json
File renamed without changes.
View
0 tcp-server/src/main/scripts/tcpServer.groovy → ...-server/src/main/scripts/tcpServer.groovy
File renamed without changes.
View
1 protocol/gradle.properties
@@ -1 +0,0 @@
-modulename=org.riderzen.ogs.protocol
View
25 settings.gradle
@@ -1 +1,24 @@
-include 'common', 'bootstrap', 'tcp-server', 'protocol'
+include 'bootstrap', 'platform', 'modules'
+include 'platform:common', 'platform:protocol', 'platform:tcp-server'
+include 'modules:sys-auth'
+
+
+rootProject.name = 'ogs'
+
+//def fixProjectPath(project, prefix, dir){
+// if (project.name.startsWith(prefix)) {
+// String projectDirName = "$dir/${project.name}"
+// project.projectDir = new File(settingsDir, projectDirName)
+// project.buildFileName = "build.gradle"
+//
+// assert project.projectDir.isDirectory()
+// assert project.buildFile.isFile()
+// }
+//}
+//
+//rootProject.children.each { project ->
+// println "setting project path: ${project.name}"
+// fixProjectPath(project, 'plat-', 'platform')
+// fixProjectPath(project, 'mod-', 'modules')
+//
+//}
View
1 tcp-server/gradle.properties
@@ -1 +0,0 @@
-modulename=org.riderzen.ogs.tcp-server

0 comments on commit 04ea7e2

Please sign in to comment.
Something went wrong with that request. Please try again.