forked from mathpere/grails-hibernate-search-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
144 lines (117 loc) · 3.68 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
}
}
version "2.4.0"
group "org.grails.plugins"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
ext {
grailsVersion = project.grailsVersion
}
configurations {
groovydocconf.extendsFrom(runtime)
}
groovydoc {
def title = "Grails Hibernate Search plugin ${version}"
groovyClasspath = project.configurations.groovydocconf
}
jar {
exclude 'hibernate.search/**'
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.grails:grails-logging"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.2.10.Final"
compile "org.hibernate:hibernate-ehcache:5.2.10.Final"
compile "org.hibernate:hibernate-search-orm:5.11.4.Final"
console "org.grails:grails-console"
profile "org.grails.profiles:plugin"
provided "org.grails:grails-plugin-services"
provided "org.grails:grails-plugin-domain-class"
provided "org.grails:grails-plugin-datasource"
provided "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-starter-tomcat"
provided "org.grails:grails-web-boot"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
groovydocconf 'org.fusesource.jansi:jansi:1.13'
groovydocconf 'org.codehaus.groovy:groovy-all:2.4.12'
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
}
grailsPublish {
// user/key: useless, see https://medium.com/@benorama/how-to-publish-your-grails-3-plugin-to-bintray-c341b24f567d#.elz43j5nq
user = 'lgrignon'
githubSlug = 'mathpere/grails-hibernate-search-plugin'
license { name = 'Apache-2.0' }
title = "Grails Hibernate Search Plugin"
desc = "This plugin aims to integrate Hibernate Search features to Grails in very few steps."
developers = [mathpere: "Mathieu Perez", lgrignon: "Louis Grignon"]
}
bintray {
pkg {
name = "hibernate-search"
}
}
publishing {
publications {
mavenJar(MavenPublication) {
groupId 'org.grails.plugins'
artifactId 'hibernate-search'
pom.withXml {
def pomNode = asNode()
pomNode.appendNode('description',
'Grails 3.2.x plugin for Hibernate Search')
pomNode.dependencyManagement.replaceNode {}
// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
}
}
from components.java
}
}
}
if (project.hasProperty('hibernateSearchMavenUser') && project.hasProperty('hibernateSearchMavenPassword') && project.hasProperty('hibernateSearchMavenRepoUrl')) {
println "Configure publish tasks"
publishing {
repositories {
maven {
credentials {
username "$hibernateSearchMavenUser"
password "$hibernateSearchMavenPassword"
}
url "$hibernateSearchMavenRepoUrl/libs-release-local"
}
}
}
}
task dumpDependencies {
doLast {
configurations.compile.each { println it }
}
}