-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.gradle
185 lines (165 loc) · 5.64 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/*
* Copyright (c) 2017 Ahome' Innovation Technologies. All rights reserved.
*
* 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.
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath(group: 'org.ajoberstar', name: 'grgit', version: '1.7.2')
classpath(group: 'commons-codec', name: 'commons-codec', version: '1.11')
classpath(group: 'commons-logging', name: 'commons-logging', version: '1.2')
classpath(group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.4')
classpath(group: 'org.fusesource.jansi', name: 'jansi', version: '1.16')
classpath(group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.13', classifier: 'indy')
}
}
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'eclipse'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '2.0.295-RELEASE'
group = 'com.ahome-it'
task doJavaDocs(type: Groovydoc) {
source = sourceSets.main.allSource
classpath = sourceSets.main.runtimeClasspath + buildscript.configurations.classpath
destinationDir = file("${buildDir}/docs/javadoc")
includes = ['com/ait/lienzo/**']
docTitle = "Lienzo 2D Structured Graphics Tests"
footer = "<small><a href=\"https://github.com/ahome-it/lienzo-tests\" target=\"_blank\">Lienzo Tests - ${version} - Author: Roger Martinez</a></small>"
getGroovydocLinks().each { name, list ->
link(name, *list)
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: doJavaDocs) {
classifier = 'javadoc'
from "${buildDir}/docs/javadoc"
}
compileJava.dependsOn(clean)
jar {
manifest {
attributes 'Implementation-Title': 'Lienzo-Tests', 'Implementation-Version': version
}
from sourceSets.main.allSource
}
repositories {
mavenCentral()
maven {
url "${sonatype_snapshotURL}"
}
}
sourceSets {
main {
resources {
srcDir 'src/main/java'
}
}
}
dependencies {
compile(group: 'com.ahome-it', name: 'lienzo-core', version: '2.0.295-RELEASE')
compile(group: 'com.google.gwt', name: 'gwt-dev', version: '2.7.0')
compile(group: 'com.google.gwt', name: 'gwt-user', version: '2.7.0')
compile(group: 'junit', name: 'junit', version: '4.11')
compile(group: 'org.mockito', name: 'mockito-core', version: '1.9.5')
compile(group: 'com.google.gwt.gwtmockito', name: 'gwtmockito', version: '1.1.6')
compile(group: 'org.javassist', name: 'javassist', version: '3.17.1-GA')
}
artifacts {
archives sourcesJar
archives javadocJar
archives jar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
//repository(url: "${sonatype_snapshotURL}") {
repository(url: "${sonatype_stageingURL}") {
authentication(userName: "${sonatype_user}", password: "${sonatype_password}")
}
pom.project {
name 'Lienzo-Tests'
packaging 'jar'
description 'Ahome Lienzo Testing Framework.'
url 'https://github.com/ahome-it/lienzo-tests'
scm {
url 'scm:[email protected]:ahome-it/lienzo-tests.git'
connection 'scm:[email protected]:ahome-it/lienzo-tests.git'
developerConnection 'scm:[email protected]:ahome-it/lienzo-tests.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 {
id 'roger600'
name 'Roger Martinez'
email '[email protected]'
url 'https://www.lienzo-core.com'
}
}
}
}
}
}
def Map<String, List<String>> getGroovydocLinks() {
def lmap = [:]
File data = file('groovydoc/GROOVYDOC_LINK_LISTS.txt')
if (data.exists()) {
data.eachLine { line ->
def vals = ((CharSequence) line).tokenize(',')
lmap[vals.head()] = vals.tail()
}
}
lmap
}
task(buildGroovydocLinks) << {
def site = [:]
File data = file('groovydoc/GROOVYDOC_LINK_SITES.txt')
if (data.exists()) {
data.eachLine { line ->
site[line] = ((CharSequence) new URL("${line}/package-list").text).tokenize('\n')
}
}
File make = file('groovydoc/GROOVYDOC_LINK_LISTS.txt')
if(make.exists()) {
make.delete()
}
make.createNewFile()
def save = make.newPrintWriter()
site.each { link, list ->
def show = "${link}"
list.each { line ->
show = "${show},${line}"
}
save.println("${show}")
}
save.flush()
save.close()
}