-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (63 loc) · 2.83 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
apply plugin: 'groovy'
apply plugin: 'maven'
def compatibilityVersion = 1.6
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion
version = '0.2-SNAPSHOT'
group = 'org.codehaus.gpars'
repositories {
mavenCentral()
mavenRepo name: 'sonatype-snapshots', url: 'https://oss.sonatype.org/content/repositories/snapshots'
mavenRepo name: 'codehaus-snapshots', url: 'http://snapshots.repository.codehaus.org/'
mavenRepo name: 'codehaus', url: 'http://repository.codehaus.org/'
}
configurations { deployerJars }
dependencies {
def gaeVersion = '1.7.5'
groovy 'org.codehaus.groovy:groovy-all:2.1.1'
compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVersion"
compile "com.google.appengine:appengine-api-labs:$gaeVersion"
compile 'org.codehaus.gpars:gpars:1.0.0'
compile 'org.gaelyk:gaelyk:2.0-SNAPSHOT'
deployerJars "org.apache.maven.wagon:wagon-http-lightweight:2.0"
}
if(hasProperty('codehausUsername') && hasProperty('codehausPassword')){
uploadArchives {
project.ext.deployer = repositories.mavenDeployer {
uniqueVersion = false
configuration = configurations.deployerJars
repository(url: 'https://dav.codehaus.org/repository/gpars/') {
authentication(userName: codehausUsername, password: codehausPassword)
}
snapshotRepository(url: 'https://dav.codehaus.org/snapshots.repository/gpars/') {
authentication(userName: codehausUsername, password: codehausPassword)
}
pom.project {
name 'GPars App Engine integration'
description 'Enables GPars on GAE'
url 'http://gpars.codehaus.org'
inceptionYear '2012'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
// In the future Gradle will allow to use dynamic props for dependencies to deal with optionals
pom.whenConfigured {pom ->
// dependency is a native Maven dependency object (With properties artifactId, groupId, ...)
pom.dependencies.each {dependency ->
if (dependency.artifactId in ['gaelyk']) { //todo perhaps needs to be verified against the real name of the dependency
dependency.optional = true
}
}
// Remove test dependencies from all poms
pom.dependencies.removeAll(pom.dependencies.findAll { it.scope == 'test' })
}
}
}
} else {
logger.warn "Cannot upload archives, codehaus username and password missing"
}