-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
100 lines (84 loc) · 2.53 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
apply plugin: 'groovy'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.apache.commons:commons-lang3:3.4'
}
ext {
getCommitIndex = {
return "git rev-list HEAD --count".execute().text.trim();
}
obtainVersionSuffix = {
if (project.hasProperty('versionSuffix')) {
return project.versionSuffix
}
return ''
}
}
group 'com.infullmobile'
version sprintf('0.3.%s%s', project.getCommitIndex(), project.obtainVersionSuffix())
println "Version is " + project.version
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
compile group: 'org.apache.maven', name: 'maven-artifact', version: '3.0.3'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}
// Maven
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId "toolkit"
version project.version
from components.java
artifact sourceJar
pom.withXml {
asNode().appendNode('description',
'Plugin which configures commonly used settings in Android projects.')
}
}
}
repositories {
maven {
name "iFMPrivateRelease"
url "s3://maven-ifm-internal/private"
credentials(AwsCredentials) {
accessKey project.getMavenAccessKey()
secretKey project.getMavenSecretKey()
}
}
maven {
name "iFMPublicRelease"
url "s3://maven-ifm-internal/public"
credentials(AwsCredentials) {
accessKey project.getMavenAccessKey()
secretKey project.getMavenSecretKey()
}
}
}
}
ext {
getMavenSecretKey = {
return project.hasProperty('mavenSecretKey') ? project['mavenSecretKey'] : ""
}
getMavenAccessKey = {
return project.hasProperty('mavenAccessKey') ? project['mavenAccessKey'] : ""
}
}
task("publishIFMPrivate", dependsOn: "publishMavenPublicationToIFMPrivateReleaseRepository") {
group "publishing"
description "Uploads artifacts to inFullMobile private maven repository"
}
task("publishIFMPublic", dependsOn: "publishMavenPublicationToIFMPublicReleaseRepository") {
group "publishing"
description "Uploads artifacts to inFullMobile public maven repository"
}