-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathbuild.gradle
More file actions
85 lines (72 loc) · 2.2 KB
/
build.gradle
File metadata and controls
85 lines (72 loc) · 2.2 KB
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
plugins {
id('java')
id('application')
id("com.github.johnrengelman.shadow") version "6.0.0"
id 'maven-publish'
}
// Fetch the current git branch name
def getGitBranchName() {
def branch = ''
try {
def proc = "git rev-parse --abbrev-ref HEAD".execute()
proc.in.eachLine { line -> branch = line }
proc.err.eachLine { line -> println line }
proc.waitFor()
} catch (Exception e) {
println "Error getting git branch name: ${e.message}"
}
branch
}
// Update the version based on the git branch name
version = getGitBranchName()
group 'com.yilmaznaslan'
mainClassName = 'com.yilmaznaslan.Main'
repositories {
mavenCentral()
}
test {
testLogging.showStandardStreams = false
}
dependencies {
// Logging
implementation 'org.slf4j:slf4j-api:2.0.6'
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'
// Selenium
implementation 'org.seleniumhq.selenium:selenium-java:4.8.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
// Screenshot
implementation group: 'ru.yandex.qatools.ashot', name: 'ashot', version: '1.5.4'
// Notifications
implementation 'com.twilio.sdk:twilio:9.13.1'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
testImplementation 'org.mockito:mockito-core:5.2.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.2'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
version = getGitBranchName() // set the version here too if required
}
}
repositories {
maven {
url 'https://yilmaznaslan-250602908823.d.codeartifact.eu-central-1.amazonaws.com/maven/berlin-auslaenderbehorde-termin-bot/'
credentials {
username "aws"
password System.env.CODEARTIFACT_AUTH_TOKEN
}
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform()
}
tasks.jar {
manifest.attributes["Main-Class"] = "com.yilmaznaslan.Main"
}