This repository has been archived by the owner on Aug 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
87 lines (69 loc) · 2.14 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
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
}
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'groovy'
apply plugin: 'maven-publish'
group 'at.karriere.gradle.plugins'
version '1.3.2'
task wrapper(type: Wrapper) {
gradleVersion = '4.9'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip"
}
dependencies {
compile gradleApi()
compile localGroovy()
testCompile "junit:junit:4.12"
testCompile "org.assertj:assertj-core:2.5.0"
testCompile 'org.mockito:mockito-core:2.4.0'
}
repositories {
jcenter()
}
jar {
manifest {
attributes('Implementation-Title': 'karriere.at Version Plugin',
'Implementation-Version': version)
}
}
pluginBundle {
website = 'https://github.com/karriereat/gradle-version-plugin'
vcsUrl = 'https://github.com/karriereat/gradle-version-plugin'
description = 'The karriere.at version plugin for automatic versioning.'
tags = ['version', 'versioning']
plugins {
versionPlugin {
id = 'at.karriere.version'
displayName = 'karriere.at Version Plugin'
description = 'A plugin developed by karriere.at that handles your versioning automatically.'
}
}
}
task setupPluginUpload {
doLast {
def key = System.env.gradlePublishKey
def secret = System.env.gradlePublishSecret
if (!key || !secret) {
throw new RuntimeException("gradlePublishKey and/or gradlePublishSecret are not defined environment variables")
}
System.properties.setProperty("gradle.publish.key", key)
System.properties.setProperty("gradle.publish.secret", secret)
}
}
publishing {
publications {
pluginPublication (MavenPublication) {
from components.java
groupId "gradle.plugin.${project.group}"
artifactId "karriere-version"
version project.version
}
}
}
tasks.publishPlugins.dependsOn tasks.setupPluginUpload