-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
81 lines (65 loc) · 2.23 KB
/
build.gradle
File metadata and controls
81 lines (65 loc) · 2.23 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
plugins {
id 'java'
id 'java-library'
id 'java-test-fixtures'
id 'com.gradleup.shadow' version '8.3.5'
id 'org.jetbrains.gradle.plugin.idea-ext' version "1.0.1"
// Fabric loom plugin
id 'fabric-loom' version '1.8-SNAPSHOT' apply false
// Plugin for running Paper dependencies with a Gradle task
id 'xyz.jpenilla.run-paper' version "2.3.1" apply false
id 'xyz.jpenilla.run-velocity' version "2.3.1" apply false
// Paperweight plugin
id("io.papermc.paperweight.userdev") version "2.0.0-beta.17" apply false
}
configurations {
shadow
}
// Configuración para copiar los JARs a un directorio común
def commonOutputDir = file("${rootDir}/output/jars")
// Tarea para limpiar el directorio común
tasks.register('cleanCommonOutputDir', Delete) {
delete commonOutputDir
}
// Tarea para copiar los JARs de los submódulos
tasks.register('copyJars', Copy) {
dependsOn subprojects.build
from subprojects.collect { it.layout.buildDirectory.dir('libs').get().asFile }
include '*.jar'
into commonOutputDir
}
// Asegúrate de que cleanCommonOutputDir se ejecute antes de copyJars
tasks.named('copyJars').configure {
dependsOn tasks.named('cleanCommonOutputDir')
}
// Vincula la tarea 'build' del proyecto raíz con copyJars
tasks.named('build').configure {
dependsOn tasks.named('copyJars')
}
allprojects {
apply from: "$rootProject.projectDir/subproject.gradle"
repositories {
maven {
url "https://jitpack.io"
credentials {
username = authToken
}
}
}
dependencies {
shadow(implementation("com.github.RazorPlay01:PacketHandler:${project.packet_handler}")) {
transitive = false
}
compileOnly "org.projectlombok:lombok:${project.lombok_version}"
annotationProcessor "org.projectlombok:lombok:${project.lombok_version}"
testCompileOnly "org.projectlombok:lombok:${project.lombok_version}"
testAnnotationProcessor "org.projectlombok:lombok:${project.lombok_version}"
}
shadowJar {
configurations = [project.configurations.shadow]
exclude('*.txt')
dependencies {
exclude(dependency('org.slf4j:.*:.*'))
}
}
}