-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle
143 lines (128 loc) · 4.92 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 {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
jcenter()
maven { url 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
}
}
version '0.9'
group 'org.grails.plugins'
apply plugin: 'org.grails.grails-plugin'
if (version.endsWith('-SNAPSHOT')) {
apply plugin: 'maven-publish'
//apply plugin: 'maven'
} else {
apply plugin: 'org.grails.grails-plugin-publish'
}
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
repositories {
mavenLocal()
maven { url 'https://repo.grails.org/grails/core' }
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-logging'
compile 'org.springframework.boot:spring-boot-autoconfigure'
compile 'org.grails:grails-core'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.boot:spring-boot-starter-tomcat'
compile 'org.grails:grails-dependencies'
compile 'ar.com.hjg:pngj:2.1.0'
compile 'com.google.zxing:core:3.2.0'
testCompile 'org.grails:grails-plugin-testing'
}
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}
if (version.endsWith('-SNAPSHOT')) {
publishing {
publications {
maven(MavenPublication) {
artifactId 'qrcode'
pom.withXml {
def pomNode = asNode()
pomNode.children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'qrcode'
description 'A plugin that allows you to create QR codes as part of your Grails application without the need for an external service'
url 'https://github.com/goeh/grails-qrcode'
scm {
url 'https://github.com/goeh/grails-qrcode'
connection 'scm:https://[email protected]/goeh/grails-qrcode.git'
developerConnection 'scm:git://github.com/goeh/grails-qrcode.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 'goeh'
name 'Goran Ehrsson'
email '[email protected]'
}
}
}
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
artifact sourcesJar
artifact javadocJar
artifact source: "${sourceSets.main.output.classesDir}/META-INF/grails-plugin.xml",
classifier: "plugin",
extension: 'xml'
}
}
repositories {
maven {
credentials {
username System.getenv('ARTIFACTORY_USERNAME') ?: project.properties.get('artifactoryPublishUsername')
password System.getenv('ARTIFACTORY_PASSWORD') ?: project.properties.get('artifactoryPublishPassword')
}
url System.getenv('ARTIFACTORY_URL') ?: project.properties.get('artifactoryPublishUrl')
}
}
}
} else {
grailsPublish {
if(project.hasProperty('bintrayUser')) {
user = bintrayUser
key = bintrayKey
userOrg = bintrayOrg
repo = bintrayRepo
} else {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
userOrg = System.getenv('BINTRAY_ORG')
repo = System.getenv('BINTRAY_REPO')
}
githubSlug = 'goeh/grails-qrcode'
desc = "A plugin that allows you to create QR codes as part of your Grails application without the need for an external service"
license = 'Apache-2.0'
}
}