-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (74 loc) · 2.49 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
plugins {
id 'application'
}
repositories {
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation libs.junit.jupiter
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// This dependency is used by the application.
implementation libs.guava
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
application {
// Define the main class for the application.
mainClass = 'engtelecom.std.App'
}
// Tarefa para executar o servidor TCP
// Execute a tarefa com o comando `./gradlew servidorTcp`
tasks.register('servidorTcp', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
description = 'Executa o servidor TCP'
group = 'application'
mainClass = 'engtelecom.std.tcp.AppServidorTcp'
}
// Tarefa para executar o cliente
// Execute a tarefa com o comando `./gradlew clienteTcp`
tasks.register('clienteTcp', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
description = 'Executa o cliente TCP'
group = 'application'
mainClass = 'engtelecom.std.tcp.AppClienteTcp'
}
// Tarefa para executar o servidor UDP
// Execute a tarefa com o comando `./gradlew servidorUdp`
tasks.register('servidorUdp', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
description = 'Executa o servidor UDP'
group = 'application'
mainClass = 'engtelecom.std.udp.AppUdpServer'
}
// Tarefa para executar o cliente UDP
// Execute a tarefa com o comando `./gradlew clienteUdp`
tasks.register('clienteUdp', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
description = 'Executa o cliente UDP'
group = 'application'
mainClass = 'engtelecom.std.udp.AppUdpClient'
}
// Tarefa para executar o servidor Multicast
// Execute a tarefa com o comando `./gradlew servidorMulticast`
tasks.register('servidorMulticast', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
description = 'Executa o servidor Multicast'
group = 'application'
mainClass = 'engtelecom.std.multicast.AppServidorMulticast'
}
// Tarefa para executar o cliente Multicast
// Execute a tarefa com o comando `./gradlew clienteMulticast`
tasks.register('clienteMulticast', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
description = 'Executa o cliente Multicast'
group = 'application'
mainClass = 'engtelecom.std.multicast.AppClienteMulticast'
}
tasks.named('test') {
useJUnitPlatform()
}