-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
107 lines (87 loc) · 3.63 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
* This file is part of emuStudio.
*
* Copyright (C) 2006-2023 Peter Jakubčo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import java.text.SimpleDateFormat
apply from: 'test_report.gradle'
ext.versions = [
slf4j: '2.0.7'
]
ext.libs = [
emuLib : "net.emustudio:emulib:12.1.0-SNAPSHOT",
cpuTestSuite : "net.emustudio:cpu-testsuite_12.1:1.2.0-SNAPSHOT",
migLayout : "com.miglayout:miglayout-swing:11.1",
jcipAnnotations : "net.jcip:jcip-annotations:1.0",
antlr : "org.antlr:antlr4:4.12.0",
antlrRuntime : "org.antlr:antlr4-runtime:4.12.0",
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.4.6",
picocli : "info.picocli:picocli:4.7.1",
picocliAnnotation: "info.picocli:picocli-codegen:4.7.1",
tomlj : "com.electronwill.night-config:toml:3.6.6",
editor : "com.fifesoft:rsyntaxtextarea:3.3.4",
editorDialogs : "com.fifesoft:rstaui:3.3.1",
junit : "junit:junit:4.13.2",
easyMock : "org.easymock:easymock:5.1.0",
mockito : "org.mockito:mockito-core:5.2.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()
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}