-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
92 lines (70 loc) · 2.53 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
plugins {
id 'java'
id "org.jetbrains.intellij" version "1.1.3"
id "org.jetbrains.grammarkit" version "2021.1.3"
}
apply plugin: 'org.jetbrains.grammarkit'
import org.jetbrains.grammarkit.tasks.*
group 'org.ca65'
version '1.7'
sourceCompatibility = 11
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'src/main/gen']
}
}
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = '2021.3'
updateSinceUntilBuild = false
}
runPluginVerifier {
ideVersions = ['IC-2021.3.1', 'CL-2021.3.2']
}
patchPluginXml {
changeNotes = """This version adds a code formatter for 6502 assembly files.
This release also corrects an issue where square brackets, as used in some 65C816 long addressing modes, were being treated as a syntax error.
Line markers for branch instructions have been improved. 65C186 branch instructions are now recognised, and the plugin can now identify branches to unnamed labels, which are indicated with a different icon. Lastly, this version corrects a bug which prevented these line markers from appearing."""
sinceBuild = '211.6693'
}
runIde {
debugOptions {
enabled = true
port = 5005
server = true
suspend = false
}
}
task generateAsmParser(type: GenerateParser) {
// source bnf file
source = "src/main/java/org/ca65/Asm.bnf"
// optional, task-specific root for the generated files. Default: none
targetRoot = 'src/main/gen'
// path to a parser file, relative to the targetRoot
pathToParser = '/org/ca65/AsmParser.java'
// path to a directory with generated psi files, relative to the targetRoot
pathToPsiRoot = '/org/ca65/psi'
// if set, plugin will remove a parser output file and psi output directory before generating new ones. Default: false
purgeOldFiles = true
}
task generateAsmLexer(type: GenerateLexer) {
// source flex file
source = "src/main/java/org/ca65/Asm.flex"
// target directory for lexer
targetDir = "src/main/gen/org/ca65"
// target classname, target file will be targetDir/targetClass.java
targetClass = "AsmLexer"
// optional, path to the task-specific skeleton file. Default: none
// skeleton = '/some/specific/skeleton'
// if set, plugin will remove a lexer output file before generating new one. Default: false
purgeOldFiles = true
}
// defaultTasks 'clean' generateAsmLexer generateAsmParser