-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (90 loc) · 2.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
classpath "org.grails:grails-gradle-plugin:3.1.8"
classpath "org.grails:grails-gradle-plugin:2.2.0.RC1"
}
}
group "org.grails"
version project.gormVersion
println "GORM VERSION = ${project.gormVersion}"
ext {
grailsVersion = "3.0.12"
groovyVersion = "2.4.7"
springBootVersion = "1.3.5.RELEASE"
orientDbVersion = '2.2.6'
springVersion = "4.1.7.RELEASE"
servletApiVersion = "3.0.1"
}
subprojects { project ->
boolean isPluginProject = project.name.endsWith("-plugin") && (project.name.startsWith("grails") || project.name.startsWith("rx-"))
boolean isGrails3PluginProject = project.name.endsWith("-plugin") && !project.name.startsWith("grails2")
boolean isGrails2PluginProject = project.name.endsWith("-plugin") && project.name.startsWith("grails2")
ext {
projectInfo = new PublishingConvention(project)
}
if(isPluginProject) {
group "org.grails.plugins"
}
else {
group "org.grails"
}
version project.gormVersion
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
configurations {
documentation
all {
resolutionStrategy {
cacheDynamicVersionsFor 0, 'hours'
cacheChangingModulesFor 0, 'hours'
}
}
}
if(isPluginProject) {
group "org.grails.plugins"
}
else {
group "org.grails"
}
if(isGrails3PluginProject) {
apply plugin: "org.grails.grails-plugin"
}
else if(!isGrails2PluginProject) {
apply plugin:"groovy"
}
if(!isGrails2PluginProject) {
apply plugin: "io.github.groovylang.groovydoc"
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
dependencies {
documentation "org.fusesource.jansi:jansi:1.11"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
}
groovydoc.jvmArgs "-Xmx512M"
groovydoc.classpath += configurations.documentation
}
}
class PublishingConvention {
Project project
String projectArtifactId
String projectName = 'GORM for OrientDB'
String projectDescription = 'Provides a GORM Object Mapping implementations for the OrientDB Document Database'
String projectURL = 'https://gorm.grails.org/latest/mongodb'
String projectIssueTrackerUrl = 'https://github.com/grails/gorm-mongodb/issues'
String projectVcsUrl = 'https://github.com/grails/gorm-mongodb'
PublishingConvention(Project project) {
this.project = project
def name = project.name
if(name.startsWith('grails') && name.endsWith('-plugin')) {
name = 'orientdb'
}
projectArtifactId = name
}
}