forked from grails/grails-gradle-plugin-archived
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
69 lines (57 loc) · 1.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
import org.apache.ivy.util.url.CredentialsStore
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'idea'
group = 'org.grails'
version = '1.1.1-SNAPSHOT'
isSnapshot = version.endsWith("SNAPSHOT")
repositories {
mavenCentral()
maven { url "http://repo.grails.org/grails/repo" }
maven { url "http://m2repo.spockframework.org/snapshots" }
}
dependencies {
compile gradleApi(), "org.grails:grails-launcher:1.0.0"
groovy localGroovy()
testCompile "org.spockframework:spock-core:0.6-groovy-1.8-SNAPSHOT"
}
task sourcesJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier "javadoc"
from javadoc
}
artifacts {
archives sourcesJar, javadocJar
}
uploadArchives {
repositories {
project.deployer = repositories.mavenDeployer {
repository(url: "http://repo.grails.org/grails/${isSnapshot ? 'libs-snapshots-local' : 'libs-releases-local'}") {
def username = project.hasProperty("grailsRepoUsername") ? project.grailsRepoUsername : null
def password = project.hasProperty("grailsRepoPassword") ? project.grailsRepoPassword : null
if (username && password) {
CredentialsStore.INSTANCE.addCredentials("Artifactory Realm", "repo.grails.org", username, password)
}
authentication(userName: username, password: password)
}
}
}
}
idea {
project {
jdkName "1.6"
ipr {
withXml { provider ->
def node = provider.asNode()
node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'
node.append(new XmlParser().parse(file("ideaCodeStyle.xml")))
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = "1.0-milestone-7"
}