-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle
More file actions
141 lines (113 loc) · 4.35 KB
/
Copy pathbuild.gradle
File metadata and controls
141 lines (113 loc) · 4.35 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
136
137
138
139
140
/* SPDX-FileCopyrightText: 2006-2026 Peter Jakubčo
SPDX-License-Identifier: GPL-3.0-or-later */
import java.text.SimpleDateFormat
plugins {
id 'org.asciidoctor.jvm.convert' version '4.0.4'
}
apply from: 'test_report.gradle'
ext.versions = [
slf4j: '2.0.17',
flatlaf: '3.7.1'
]
ext.libs = [
emuLib : "net.emustudio:emulib:12.1.0-SNAPSHOT",
cpuTestSuite : "net.emustudio:cpu-testsuite_12:1.2.1-SNAPSHOT",
migLayout : "com.miglayout:miglayout-swing:11.4.3",
flatLaf : "com.formdev:flatlaf:${versions.flatlaf}:no-natives",
flatLafExtras : "com.formdev:flatlaf-extras:${versions.flatlaf}",
jcipAnnotations : "net.jcip:jcip-annotations:1.0",
antlr : "org.antlr:antlr4:4.13.2",
antlrRuntime : "org.antlr:antlr4-runtime:4.13.2",
slf4JApi : "org.slf4j:slf4j-api:${versions.slf4j}",
slf4JSimple : "org.slf4j:slf4j-simple:${versions.slf4j}",
slf4JNop : "org.slf4j:slf4j-nop:${versions.slf4j}",
logback : "ch.qos.logback:logback-classic:1.5.32",
picocli : "info.picocli:picocli:4.7.7",
picocliAnnotation: "info.picocli:picocli-codegen:4.7.7",
tomlj : "com.electronwill.night-config:toml:3.8.3",
editor : "com.fifesoft:rsyntaxtextarea:3.6.2",
editorDialogs : "com.fifesoft:rstaui:3.3.2",
jcodec : "org.jcodec:jcodec:0.2.3",
jcodecJavase : "org.jcodec:jcodec-javase:0.2.3",
cacioTta : "com.github.caciocavallosilano:cacio-tta:1.11.1",
junit : "junit:junit:4.13.2",
easyMock : "org.easymock:easymock:5.6.0",
mockito : "org.mockito:mockito-core:5.23.0"
]
allprojects {
version = '0.42-SNAPSHOT'
configurations {
compilerLib
memoryLib
deviceLib
cpuLib
implementation.extendsFrom(compilerLib)
implementation.extendsFrom(memoryLib)
implementation.extendsFrom(deviceLib)
implementation.extendsFrom(cpuLib)
}
def libClassPath = {
def libs = configurations.runtimeClasspath.files.collect { "lib/" + it.getName() } +
configurations.compilerLib.files.collect { "compiler/" + it.getName() } +
configurations.memoryLib.files.collect { "memory/" + it.getName() } +
configurations.deviceLib.files.collect { "device/" + it.getName() } +
configurations.cpuLib.files.collect { "cpu/" + it.getName() }
return libs.join(' ')
}
ext.manifestAttributes = { String mainClass ->
def baseAttributes = [
'Class-Path' : libClassPath(),
"Implementation-Title" : project.name,
"Implementation-Version": project.version,
'Build-Timestamp' : new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Build-Jdk' : "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS' : "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}"
]
if (mainClass != null && mainClass != '') {
baseAttributes.put('Main-Class', mainClass)
}
return baseAttributes
}
}
subprojects {
repositories {
mavenLocal()
maven {
name = 'Central Portal Snapshots'
url = 'https://central.sonatype.com/repository/maven-snapshots/'
}
mavenCentral()
}
}
// Architecture documentation (C4 model, AsciiDoc -> HTML)
repositories {
mavenCentral()
}
asciidoctorj {
modules {
diagram.use() // enables PlantUML/C4 diagrams via asciidoctor-diagram
}
}
tasks.register('doc', org.asciidoctor.gradle.jvm.AsciidoctorTask) {
group = 'documentation'
description = 'Generates HTML of the docs/ AsciiDoc documents into docs/output/'
baseDirFollowsSourceDir()
sourceDir file('docs')
sources {
include '*.adoc'
}
outputDir file('docs/output')
outputOptions {
backends 'html5'
separateOutputDirs = false
}
attributes(
'toc' : 'left',
'icons' : 'font',
'source-highlighter': 'rouge',
'sectanchors' : '',
'docdate' : new Date().format('yyyy-MM-dd'),
'imagesdir' : 'images',
'imagesoutdir' : file('docs/output/images')
)
}