-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
177 lines (159 loc) · 5.82 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
buildscript {
repositories {
jcenter()
}
dependencies {
}
}
plugins {
id "com.jfrog.bintray" version "1.2"
}
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
group = 'com.bertramlabs.plugins'
version = '2.5.2'
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven { url "http://oss.jfrog.org/artifactory/repo" }
}
configurations {
provided
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
ext {
isReleaseVersion = !version.endsWith("SNAPSHOT")
slf4jVersion = "1.7.10"
ratpackVersion = "1.0.0"
spockVersion = "1.0-groovy-2.4"
cglibVersion = "2.2.2"
objenesisVersion = "2.1"
groovyVersion = "2.4.3"
}
dependencies {
compile "com.bertramlabs.plugins:asset-pipeline-core:2.5.2"
compile "io.ratpack:ratpack-guice:${ratpackVersion}"
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
runtime "org.slf4j:slf4j-simple:${slf4jVersion}"
testCompile "org.spockframework:spock-core:${spockVersion}"
testCompile "cglib:cglib:${cglibVersion}"
testCompile "org.objenesis:objenesis:${objenesisVersion}"
testCompile "io.ratpack:ratpack-test:${ratpackVersion}"
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'ratpack-asset-pipeline'
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'ratpack-asset-pipeline'
description 'Provides asset-pipeline integration with the ratpack framework.'
url 'https://github.com/bertramdev/ratpack-asset-pipeline'
scm {
url 'https://github.com/bertramdev/ratpack-asset-pipeline'
connection 'scm:https://[email protected]/bertramdev/ratpack-asset-pipeline.git'
developerConnection 'scm:git://github.com/bertramdev/ratpack-asset-pipeline.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/license/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'davydotcom'
name 'David Estes'
email '[email protected]'
}
}
}
}
from components.java
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
credentials {
username project.properties.get('artifactoryPublishUsername')
password project.properties.get('artifactoryPublishPassword')
}
url "https://repo.grails.org/grails/libs-snapshots-local/"
}
}
}
bintray {
if(project.hasProperty('bintrayUser')) {
user = bintrayUser
key = bintrayKey
}
publications = ['maven']
pkg {
repo = 'asset-pipeline'
userOrg = 'bertramlabs'
name = 'ratpack-asset-pipeline'
licenses = ['Apache-2.0']
websiteUrl = 'https://github.com/bertramdev/ratpack-asset-pipeline'
issueTrackerUrl = 'https://github.com/bertramdev/ratpack-asset-pipeline/issues'
vcsUrl = 'https://github.com/bertramdev/ratpack-asset-pipeline.git'
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
test {
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
}
idea {
project {
jdkName "1.8"
languageLevel "1.8"
ipr {
withXml { provider ->
def node = provider.asNode()
node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'
def copyrightManager = node.component.find { it.'@name' == 'CopyrightManager' }
copyrightManager.@default = "ASL2"
def aslCopyright = copyrightManager.copyright.find { it.option.find { it.@name == "myName" }?.@value == "ASL2" }
if (aslCopyright == null) {
copyrightManager.append(new XmlParser().parseText("""
<copyright>
<option name="notice" value="Copyright \$today.year the original author or authors. 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." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="" />
<option name="myName" value="ASL2" />
<option name="myLocal" value="true" />
</copyright>
"""))
}
def module2copyright = copyrightManager.module2copyright.first()
def productionCodeModule = module2copyright.find { it.element.find { it.@module == "Production" }?.@value == "ASL2" }
if (productionCodeModule == null) {
module2copyright.append(new XmlParser().parseText("""
<element module="Production" copyright="ASL2" />
"""))
}
}
}
}
}