forked from oprisnik/gradle-getlocalization-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (90 loc) · 2.54 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.townsfolk:gradle-release:1.2'
}
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'release'
group = "io.stepuplabs.getlocalization.gradle"
version = "1.3.0"
ext.archivesBaseName = 'gradle-getlocalization-plugin'
ext.isSnapshot = version.endsWith("-SNAPSHOT")
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
}
task sourceJar(type: Jar) {
description = 'An archive of the source code for Maven Central'
classifier = 'sources'
from sourceSets.main.groovy
}
task groovydocJar(type: Jar) {
description = 'An archive of the groovy docs for Maven Central'
classifier = 'javadoc'
from groovydoc
}
artifacts {
archives groovydocJar, sourceJar
}
signing {
sign configurations.archives
}
// Only *require* signing if we are uploading a non snapshot version
gradle.taskGraph.whenReady { taskGraph ->
tasks.withType(org.gradle.plugins.signing.Sign).all {
required = taskGraph.hasTask(":uploadArchives") && !isSnapshot
}
}
install.repositories.mavenInstaller {
pom.project(pomConfiguration)
if (signing.signatory) {
beforeDeployment { signing.signPom(it) }
}
}
uploadArchives {
repositories.mavenDeployer {
if (signing.signatory) {
beforeDeployment { signPom(it) }
}
name = 'mavenCentralReleaseDeployer'
pom.project(pomConfiguration)
}
}
release {
createReleaseTag.dependsOn uploadArchives
}
def getPomConfiguration() {
return {
name 'Gradle GetLocalization Plugin'
packaging 'jar'
description 'A Gradle plugin for managing translations through GetLocalization.'
url 'https://github.com/step-up-labs/gradle-getlocalization-plugin'
licenses {
license {
name 'The MIT License'
url 'http://www.opensource.org/licenses/mit-license.php'
distribution 'repo'
}
}
developers {
developer {
id 'step-up-labs'
name 'Step Up Labs'
email '[email protected]'
}
}
scm {
connection 'scm:https://[email protected]/step-up-labs/gradle-getlocalization-plugin'
developerConnection 'scm:[email protected]:step-up-labs/gradle-getlocalization-plugin.git'
url 'https://github.com/step-up-labs/gradle-getlocalization-plugin'
}
}
}