-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (92 loc) · 2.62 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
108
109
110
plugins {
id 'java'
id 'org.jastadd' version '1.13.3'
}
defaultTasks 'jar'
if (!file('extendj/jastadd_modules').exists()) {
throw new GradleException('ExtendJ seems to be missing. Please run "git submodule init", then "git submodule update".')
}
jastadd {
configureModuleBuild()
modules {
include("extendj/jastadd_modules") // Include core ExtendJ modules.
module "pbatakjava", {
imports "java8 frontend" // ExtendJ dependency for template module.
imports "java8 backend"
jastadd {
basedir "batakjava"
include "**/syntax/*.ast"
include "**/frontend/*.jrag"
include "**/frontend/*.jadd"
include "**/constraint/*.jrag"
include "**/backend/*.jrag"
}
scanner {
basedir "batakjava/syntax"
include "**/*.flex"
}
parser {
basedir "batakjava/syntax"
include "**/*.parser"
}
}
}
// Target module to build:
module = 'pbatakjava'
astPackage = 'org.extendj.ast'
parser.name = 'JavaParser'
scanner.name = 'OriginalScanner'
}
sourceSets.main {
java {
srcDir 'extendj/src/frontend-main'
srcDir 'extendj/src/backend-main'
srcDir 'src/frontend-main'
srcDir 'src/backend-main'
}
resources {
srcDir 'extendj/src/res'
srcDir jastadd.buildInfoDir
}
}
repositories.mavenLocal()
dependencies {
compile 'com.microsoft:z3:4.8.10'
compile 'org.choco-solver:choco-solver:4.10.5'
compile 'com.google.guava:guava:30.1-jre'
}
jar {
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
// Use JavaCompiler if you need bytecode generation.
//jar.manifest.attributes 'Main-Class': 'org.extendj.JavaChecker'
//jar.manifest.attributes 'Main-Class': 'org.extendj.JavaCompiler'
//jar.manifest.attributes 'Main-Class': 'org.batakjava.BatakjavaChecker'
jar.manifest.attributes 'Main-Class': 'org.batakjava.BatakjavaCompiler'
//jar.manifest.attributes 'Main-Class': 'org.batakjava.DependencyChecker'
jar.destinationDir = projectDir
// Java -source and -target version.
sourceCompatibility = targetCompatibility = '1.8'
task sourceZip(type: Zip) {
description 'Builds a Zip file with the entire repisotory (including the ExtendJ submodule).'
destinationDir = projectDir
archiveName = "pbatakjava-src.zip"
from (projectDir) {
exclude '**/.git'
exclude '**/.gitignore'
exclude '**/.gitattributes'
exclude '**/.gitmodules'
exclude 'build'
exclude 'bin'
exclude '.gradle'
exclude '.classpath'
exclude '.settings'
exclude '.project'
exclude '*.jar'
exclude '*.zip'
exclude '**/*.swp'
}
into 'pbatakjava'
}