-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (55 loc) · 1.77 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
plugins {
id "java"
id "org.springframework.boot" version "3.2.0"
id "io.spring.dependency-management" version "1.1.4"
id 'net.researchgate.release' version '3.0.2'
id 'maven-publish'
}
allprojects {
repositories {
mavenCentral()
}
}
rootProject.subprojects { subproject ->
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
group = project.getProperty("group")
version = project.getProperty("version")
artifactName = subproject.getProperty("artifactName")
packaging = subproject.getProperty("packaging")
subproject.ext.versions = [
lombok : "1.18.24",
]
}
bootJar {
enabled = false
}
jar {
enabled = true
}
release {
buildTasks = ['publish']
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/cardinal-app/fitness-tracker")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
/** Courtesy of
* https://medium.com/@shanemyrick/publishing-to-github-packages-with-gradle-and-github-actions-4ad842634c4e
* https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry
* https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
* https://dev.to/github/the-githubtoken-in-github-actions-how-it-works-change-permissions-customizations-3cgp
*/
}