-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
109 lines (94 loc) · 2.89 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
plugins {
id 'java'
id 'idea'
id 'io.quarkus'
id 'com.diffplug.spotless'
id 'maven-publish'
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-arc'
implementation 'io.quarkus:quarkus-vertx'
implementation 'io.quarkus:quarkus-qute'
implementation 'io.quarkus:quarkus-jackson'
implementation 'com.slack.api:bolt-jakarta-socket-mode:1.43.1'
implementation 'jakarta.websocket:jakarta.websocket-client-api:2.2.0'
implementation 'org.glassfish.tyrus.bundles:tyrus-standalone-client:2.2.0'
testImplementation 'io.quarkus:quarkus-junit5'
}
group 'com.lescastcodeurs'
version System.getenv('RELEASE_VERSION') ?: '1.0.0'
// https://docs.gradle.org/current/userguide/publishing_customization.html#sec:publishing_custom_artifacts_to_maven
def runnerJar = layout.buildDirectory.file("${rootProject.name}-${version}-runner.jar")
def runnerArtifact = artifacts.add('archives', runnerJar.get().asFile) {
type 'runner'
builtBy 'quarkusBuild'
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
compileTestJava {
options.encoding = 'UTF-8'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact runnerArtifact
pom {
name = 'Les Cast Codeurs podcast bot'
description = 'A slack bot that automates show notes creation for Les Cast Codeurs podcast'
url = 'https://github.com/lescastcodeurs/lcc-slack-bot'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/lescastcodeurs/lcc-slack-bot/blob/main/LICENSE'
}
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/lescastcodeurs/lcc-slack-bot"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
spotless {
java {
target '**/*.java' // prevent quarkus generated code to be formatted
googleJavaFormat('1.15.0')
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
// https://quarkus.io/guides/gradle-tooling#publishing-your-application
tasks.withType(GenerateModuleMetadata).configureEach {
suppressedValidationErrors.add('enforced-platform')
}
// Auto-format code if not on CI
// See also https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables,
// https://docs.gitlab.com/ee/ci/variables/predefined_variables.html.
if (!System.getenv().containsKey('CI')) {
tasks.named('spotlessCheck') {
dependsOn(tasks.named('spotlessApply'))
}
} // else execute only spotlessCheck