-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (70 loc) · 2.07 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
import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'nu.studer:gradle-plugindev-plugin:1.0.4'
classpath "com.gradle.publish:plugin-publish-plugin:0.9.4"
classpath 'org.ajoberstar:gradle-git:1.4.2'
}
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'groovy'
apply plugin: 'nu.studer.plugindev'
dependencies {
compile gradleApi()
compile localGroovy()
testCompile 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
testCompile 'junit:junit:4.12'
}
ext {
gitRepo = Grgit.open(dir: projectDir)
}
version = '1.0'
group = 'com.github.fwilhe.asciidoctor_pdf_theme_gradle_plugin'
plugindev {
pluginId = 'com.github.fwilhe.asciidoctor-pdf-theme'
pluginImplementationClass = 'com.github.fwilhe.asciidoctor_pdf_theme_gradle_plugin.AsciidoctorPdfThemePlugin'
}
publishing {
publications {
maven(MavenPublication) {
groupId 'com.github.fwilhe.asciidoctor_pdf_theme_gradle_plugin'
artifactId 'AsciidoctorPdfThemePlugin'
version 'latest'
from components.java
}
}
}
pluginBundle {
website = 'https://github.com/fwilhe/asciidoctor-pdf-theme-gradle-plugin'
vcsUrl = 'https://github.com/fwilhe/asciidoctor-pdf-theme-gradle-plugin'
description = 'Allows to get a Theme for Asciidoctor PDF from a remote Git Repository when building the PDF.'
tags = ['asciidoc', 'asciidoctor', 'pdf']
plugins {
AsciidoctorPdfThemePlugin {
id = 'com.github.fwilhe.asciidoctor-pdf-theme'
displayName = 'Gradle Plugin for downloading Asciidoctor PDF Themes'
}
}
}
task createTag
createTag.doLast {
gitRepo.tag.add {
name = version
message = "Release ${version}"
}
}
task pushTag {
dependsOn createTag
doLast {
gitRepo.push {
tags = true
remote = 'origin'
}
}
mustRunAfter publishPlugins
}
task release(dependsOn: [pushTag, publishPlugins])