-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
78 lines (72 loc) · 1.97 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
plugins {
id 'version-catalog'
id 'shared'
}
managedVersioning {
gitHubActions {
release {
prettyName.set 'Release'
workflowDispatch.set(true)
gradleJob {
name.set 'build'
step {
setupGitUser()
}
buildCache()
readOnly.set false
gradlew 'Tag Release', 'tagRelease'
gradlew 'Build', 'build'
step {
run.set 'git push && git push --tags'
}
gradlew 'Publish', 'publish'
mavenRelease('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/conventions/conventions-*',
'Build PR'
)
}
}
}
println "Building: $version"
dependencies {
implementation libs.gradle.foojay
implementation libs.gradle.develocity
}
gradlePlugin {
plugins {
sharedPlugin {
id = 'dev.lukebemish.conventions'
implementationClass = 'dev.lukebemish.conventions.ConventionsPlugin'
}
}
}
catalog {
versionCatalog {
from(files("gradle/libs.versions.toml"))
version 'conventions', project.version as String
library('conventions.settings', 'dev.lukebemish', 'conventions').versionRef('conventions')
library('conventions.java', 'dev.lukebemish.conventions', 'java').versionRef('conventions')
library('conventions.buildsrc', 'dev.lukebemish.conventions', 'conventionplugin').versionRef('conventions')
plugin('conventions.settings', 'dev.lukebemish.conventions').versionRef('conventions')
plugin('conventions.java', 'dev.lukebemish.conventions.java').versionRef('conventions')
plugin('conventions.buildsrc', 'dev.lukebemish.conventions.buildsrc').versionRef('conventions')
}
}
AdhocComponentWithVariants javaComponent = (AdhocComponentWithVariants) project.components.named("java").get()
javaComponent.addVariantsFromConfiguration(configurations.versionCatalogElements) {}