-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
135 lines (113 loc) · 4 KB
/
build.gradle
File metadata and controls
135 lines (113 loc) · 4 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/**
* build.gradle
*
* This is the Gradle build configuration file for a Java project that uses:
* - Hibernate ORM with Jakarta Persistence API for object-relational mapping.
* - H2 as the in-memory database.
* - Log4j for logging.
* - JUnit for testing.
*
* Key plugins and dependencies:
* - JUnit Jupiter for unit testing.
* - Hibernate for ORM (version 6.6.1).
* - H2 as the lightweight in-memory database.
* - Log4j for application logging.
*/
plugins {
// Apply the Java plugin for compiling Java code.
id 'java'
// Application plugin to support running the main class
id 'application'
}
group = 'org.app' // The package group of the project.
version = '1.0-SNAPSHOT' // Version number of the project, used for snapshots.
// Add the main class configuration for the application plugin
application {
// Specify the fully qualified name of your main class
mainClass = 'org.app.Main'
// Configure the application's runtime settings
applicationDefaultJvmArgs = [
// Increase memory if needed for your application
'-Xmx512m',
// Add any system properties your application needs
'-Dlog4j.configurationFile=log4j2.properties'
]
}
// Configuración de Java
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
// Use Maven Central repository to download dependencies.
mavenCentral()
}
// Configuración de directorios de recursos
sourceSets {
main {
resources {
srcDirs = ['src/main/resources']
}
}
test {
resources {
srcDirs = ['src/test/resources']
}
}
}
dependencies {
// Hibernate Core ORM library for mapping Java classes to database tables.
implementation 'org.hibernate.orm:hibernate-core:6.6.1.Final'
// Hibernate Validator for enforcing constraints on object fields.
implementation 'org.hibernate.validator:hibernate-validator:8.0.1.Final'
// Jakarta Expression Language API for evaluating dynamic expressions.
implementation 'jakarta.el:jakarta.el-api:6.0.1'
// Jakarta Persistence API for ORM, providing entity management and queries.
implementation 'jakarta.persistence:jakarta.persistence-api:3.2.0'
// Log4j 2 for logging application output.
implementation 'org.apache.logging.log4j:log4j-core:2.24.0'
implementation 'org.apache.logging.log4j:log4j-api:2.24.0'
// H2 database dependency, which is a lightweight, in-memory, or file-based database.
runtimeOnly 'com.h2database:h2:2.3.232'
// Testing dependencies
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.0'
}
test {
// Configure Gradle to use JUnit Platform for running tests.
useJUnitPlatform()
// Show test output in console
testLogging {
events "passed", "skipped", "failed"
}
}
// Tarea para limpiar la documentación generada
tasks.register('cleanDocs', Delete) {
delete "${projectDir}/docs/javadoc"
}
tasks.javadoc {
destinationDir = file("${projectDir}/docs/javadoc")
dependsOn cleanDocs
options {
encoding = 'UTF-8'
charSet = 'UTF-8'
author = true
version = true
use = true
// Título de la ventana del navegador
windowTitle = 'JoustAsEasy API Documentation'
// Título principal de la documentación
title = "JoustAsEasy Documentation (Version ${project.version})"
// Enlaces a la documentación de Java
links = ['https://docs.oracle.com/en/java/javase/11/docs/api/']
// Grupos de paquetes para mejor organización usando Map
groups = [
'Core Entities': ['org.app.entities*'],
'Services': ['org.app.services*'],
'Console Interface': ['org.app.consoleMenu*'],
'Models': ['org.app.model*']
]
// Mostrar warnings de javadoc
addStringOption('Xdoclint:none', '-quiet')
}
}