-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
141 lines (126 loc) · 4.86 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
/**
*
* Copyright 2013-2019 Martin Goellnitz
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import groovy.util.Node
import groovy.util.GroovyScriptEngine
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1'
}
}
plugins {
id 'com.gradle.plugin-publish' version '0.9.4'
}
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
defaultTasks 'clean', 'publishToMavenLocal'
version '1.2.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
def bootstrapClasspathStr = "${project.hasProperty('jdk') ? jdk : System.env.JAVA_HOME}/jre/lib/rt.jar"
project.tasks.withType(AbstractCompile, { AbstractCompile ac ->
ac.options.bootstrapClasspath = files(bootstrapClasspathStr)
})
String[] roots = ["${project.projectDir}/src/main/groovy"]
def versions = new GroovyScriptEngine(roots).loadScriptByName('org/tangram/gradle/plugin/TangramVersions.groovy').newInstance()
repositories {
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile "com.yahoo.platform.yui:yuicompressor:$versions.yui"
// persistence APIs
compile "$versions.jdo_api"
compile "$versions.persistence_api"
// for the direct datanucleus enhancer
compile "org.datanucleus:datanucleus-core:$versions.datanucleus"
compile "org.datanucleus:datanucleus-api-jdo:$versions.datanucleus"
compile "org.datanucleus:datanucleus-api-jpa:$versions.datanucleus"
// for the direct eclipselink enhancer
compile "org.eclipse.persistence:org.eclipse.persistence.jpa:$versions.eclipselink"
// For the direct ebean enhancer
compile "io.ebean:ebean:$versions.ebean"
compile "io.ebean:ebean-agent:$versions.ebean_agent"
// For the direct hibernate enhancer
compile "net.bytebuddy:byte-buddy:$versions.byte_buddy"
compile "org.hibernate:hibernate-core:$versions.hibernate"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task groovydocJar(type: Jar, dependsOn: groovydoc) {
classifier = 'javadoc'
from "${buildDir}/docs/groovydoc"
}
publishing {
publications {
mavenJava(MavenPublication) {
if (gradle.gradleVersion != '1.6') {
groupId 'tangram'
artifactId 'gradle-plugin'
}
from components.java
artifact sourcesJar
artifact groovydocJar
pom.withXml {
def rootNode = asNode()
rootNode.children().get(3).plus {
new Node(rootNode, 'name', "Tangram Gradle plugin")
new Node(rootNode, 'description', 'Object oriented templating and dynamic web development framework')
new Node(rootNode, 'url', 'https://github.com/mgoellnitz/tangram/')
def license = new Node(rootNode, 'licenses').appendNode('license')
license.appendNode('name', 'LGPL-3.0')
license.appendNode('url', 'http://opensource.org/licenses/LGPL-3.0')
license
def issues = new Node(rootNode, 'issueManagement')
issues.appendNode('system', 'mail')
issues.appendNode('url', 'mailto:tangram@provocon.de')
issues
def scm = new Node(rootNode, 'scm')
scm.appendNode('connection', 'scm:git:git@github.com:mgoellnitz/tangram.git')
scm.appendNode('developerConnection', 'scm:git:git@github.com:mgoellnitz/tangram.git')
scm.appendNode('url', 'https://github.com/mgoellnitz/tangram.git')
scm
def developer = rootNode.appendNode('developers').appendNode('developer')
developer.appendNode('name', 'Martin Goellnitz')
developer.appendNode('organization', 'Provocon')
developer.appendNode('organizationUrl', 'http://www.provocon.de/')
developer
}
}
}
}
}
pluginBundle {
website = 'https://github.com/mgoellnitz/tangram/wiki/Plugin'
vcsUrl = 'https://github.com/mgoellnitz/tangram/'
description = 'Generic JPA, JDO, EBean byte code transformation plugin, webapp overlay helper, and minifying plugin developed for Tangram - Verson 1.1.2 is again JDK 1.7 compatible'
tags = ['tangram', 'jdo', 'jpa', 'ebean', 'datanucleus', 'eclipselink', 'hibernate', 'openjpa', 'overlay', 'minify']
plugins {
greetingsPlugin {
id = 'tangram.tools'
displayName = 'Tangram Gradle plugin'
}
}
}