-
Notifications
You must be signed in to change notification settings - Fork 46
/
build.gradle
78 lines (62 loc) · 1.95 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
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'idea'
//The "upload" system property should be set to true if the uploading
// credentials should be configured (generally private)
group = 'org.gradle.tools'
archivesBaseName = 'maven2gradle'
version = '1.0-SNAPSHOT'
sourceCompatibility = 1.6
targetCompatibility = 1.6
defaultTasks "build"
repositories {
if (System.properties.upload == "true")
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("REALM", "HOST", "USER", "PASSWORD")
mavenRepo urls: ["http://repo.jfrog.org/artifactory/libs-releases"]
mavenRepo urls: ["http://repo.jfrog.org/artifactory/libs-snapshots"]
}
configurations {
deployerJars
}
task sourcesJar(type: Jar, dependsOn: compileGroovy) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
dependencies {
groovy localGroovy()
compile group: 'org.apache.ant', name: 'ant', version: '1.8.2'
deployerJars group: 'org.apache.maven.wagon', name: 'wagon-ssh', version: '1.0-beta-2'
}
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
pom.artifactId = 'maven2gradle'
if (System.properties.upload == "true") {
snapshotRepository(url: "http://repo.jfrog.org/artifactory/gradle-snapshots-local") {
authentication(userName: USER, password: PASSWORD)
}
}
}
}
task installJARs(type: Copy, dependsOn: build) {
//Copy output JAR to $GRADLE_HOME/lib/
def gradleHome = System.getenv()['GRADLE_HOME']
def gradleHomeLib = gradleHome + "/lib"
from ('build/libs') {
include '*.jar'
exclude '*-sources.jar'
}
into ("${gradleHomeLib}")
}
task installScripts(type: Copy, dependsOn: installJARs) {
//Copy shell scripts to $GRADLE_HOME/bin/
def gradleHome = System.getenv()['GRADLE_HOME']
def gradleHomeBin = gradleHome + "/bin"
from ('bin') {
include 'maven2gradle*'
}
into (gradleHomeBin)
}