-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
121 lines (112 loc) · 3.5 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import org.gradle.api.attributes.plugin.GradlePluginApiVersion
plugins {
id 'java-gradle-plugin'
alias cLibs.plugins.gradlepublish
}
['apiElements', 'runtimeElements'].each {
configurations.named(it).configure {
attributes {
attribute(
GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE,
objects.named(GradlePluginApiVersion, gradle.gradleVersion)
)
}
}
}
dependencies {
implementation gradleApi()
implementation 'commons-io:commons-io:2.16.1'
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r'
}
gradlePlugin {
website = 'https://github.com/lukebemishprojects/Immaculate'
vcsUrl = 'https://github.com/lukebemishprojects/Immaculate.git'
plugins {
immaculatePlugin {
id = 'dev.lukebemish.immaculate'
implementationClass = 'dev.lukebemish.immaculate.ImmaculatePlugin'
displayName = 'Immaculate'
description = 'A plugin for applying various code formatting'
tags.addAll(['format', 'style'])
}
}
}
jar {
manifest {
attributes(
'Implementation-Version': version as String
)
}
}
tasks.named('wrapper', Wrapper) {
distributionType = Wrapper.DistributionType.ALL
}
managedVersioning {
gitHubActions {
release {
prettyName = 'Release'
workflowDispatch = true
gradleJob {
name.set 'build'
buildCache()
setupGitUser()
readOnly = false
gradlew 'Tag Release', 'tagRelease'
gradlew 'Build', 'build'
push()
recordVersion 'Record Version', 'version'
dependencySubmission()
}
gradleJob {
name.set 'publishCentral'
buildCache()
needs.add('build')
gradlew 'Publish Central', 'publishCentral', 'closeAndReleaseSonatypeStagingRepository'
tag.set('${{needs.build.outputs.version}}')
sign()
mavenCentral()
mavenStaging('github')
}
gradleJob {
name.set 'publishPlugins'
buildCache()
needs.add('build')
gradlew 'Publish Plugins', 'publishPlugins'
tag.set('${{needs.build.outputs.version}}')
pluginPortal()
}
}
snapshot {
prettyName.set 'Snapshot'
workflowDispatch.set(true)
onBranches.add 'main'
gradleJob {
name.set 'build'
buildCache()
cacheReadOnly = false
gradlew 'Build', 'build'
gradlew 'Publish', 'publish'
mavenSnapshot('github')
}
}
build_pr {
prettyName.set 'Build PR'
pullRequest.set(true)
gradleJob {
name.set 'build'
gradlew 'Build', 'build'
gradlew 'Publish', 'publish'
pullRequestArtifact()
}
}
publish_pr {
prettyName.set 'Publish PR'
publishPullRequestAction(
'github',
"dev/lukebemish/immaculate,dev/lukebemish/immaculate/*,dev/lukebemish/immaculate/wrapper/*",
'Build PR'
)
}
}
}
managedVersioning.publishing.mavenCentral()