-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
33 lines (25 loc) · 1.3 KB
/
Copy pathbuild.gradle
File metadata and controls
33 lines (25 loc) · 1.3 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
def projects = [":server", ":client"]
tasks.register('javadocAll', Javadoc) {
group = "documentation"
description = "Generate a full documentation for every subproject."
source projects.collect { project(it).sourceSets.main.allJava }
classpath = files(projects.collect { project(it).sourceSets.main.compileClasspath })
destinationDir = file("docs/javadoc")
options.addBooleanOption("-allow-script-in-comments", true)
options.links "http://docs.oracle.com/javase/22/docs/api/"
options.header "<script id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>"
options.showFromPrivate()
}
def dbmsRootPassword = new String(file("assets/dbms_root_password").readBytes()).strip()
tasks.register('installDatabase', Exec) {
group = "other"
description = "Configures the database to be used by the server."
commandLine "mysql", "-u", "root", "--password=$dbmsRootPassword"
standardInput = file("assets/install_database.sql").newInputStream()
}
tasks.register('uninstallDatabase', Exec) {
group = "other"
description = "Removes the database used by the server and its user."
commandLine "mysql", "-u", "root", "--password=$dbmsRootPassword"
standardInput = file("assets/uninstall_database.sql").newInputStream()
}