Skip to content

Commit 301242b

Browse files
committed
Add readme, update build.gradle to support newer gradle
1 parent e3527ac commit 301242b

File tree

2 files changed

+46
-9
lines changed

2 files changed

+46
-9
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
# Version Polymorphic BatakJava
1+
# Version Polymorphic BatakJava
2+
3+
## System requirements
4+
5+
- Gradle (8.10.1)
6+
- Apache Maven (3.9.6)
7+
- > Java 8
8+
- [Z3 Solver](https://github.com/Z3Prover/z3) version 4.8.10
9+
10+
### Gradle installation
11+
12+
- MacOS
13+
14+
Install using brew:
15+
16+
```
17+
brew install gradle
18+
```
19+
20+
### Z3 solver installation
21+
22+
1. Download the Z3 version 4.8.10 ([link](https://github.com/Z3Prover/z3/releases/tag/z3-4.8.10)) for your OS.
23+
24+
2. Unpack the downloaded file
25+
26+
3. Install to local Maven repository:
27+
28+
```
29+
30+
```
31+
32+
Reference: https://stackoverflow.com/questions/60403775/how-to-setup-a-java-development-environment-for-z3

build.gradle

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ plugins {
33
id 'org.jastadd' version '1.13.3'
44
}
55

6+
java {
7+
toolchain {
8+
languageVersion.set(JavaLanguageVersion.of(8))
9+
}
10+
}
11+
612
defaultTasks 'jar'
713

814
if (!file('extendj/jastadd_modules').exists()) {
@@ -63,15 +69,16 @@ sourceSets.main {
6369

6470
repositories.mavenLocal()
6571
dependencies {
66-
compile 'com.microsoft:z3:4.8.10'
67-
compile 'org.choco-solver:choco-solver:4.10.5'
68-
compile 'com.google.guava:guava:30.1-jre'
72+
implementation 'com.microsoft:z3:4.8.10'
73+
implementation 'org.choco-solver:choco-solver:4.10.5'
74+
implementation 'com.google.guava:guava:30.1-jre'
6975
}
7076

7177
jar {
7278
from {
73-
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
79+
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
7480
}
81+
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
7582
}
7683

7784
// Use JavaCompiler if you need bytecode generation.
@@ -80,16 +87,15 @@ jar {
8087
//jar.manifest.attributes 'Main-Class': 'org.batakjava.BatakjavaChecker'
8188
jar.manifest.attributes 'Main-Class': 'org.batakjava.BatakjavaCompiler'
8289
//jar.manifest.attributes 'Main-Class': 'org.batakjava.DependencyChecker'
83-
jar.destinationDir = projectDir
90+
jar.destinationDirectory = projectDir
8491

8592
// Java -source and -target version.
8693
sourceCompatibility = targetCompatibility = '1.8'
8794

8895
task sourceZip(type: Zip) {
8996
description 'Builds a Zip file with the entire repisotory (including the ExtendJ submodule).'
90-
destinationDir = projectDir
91-
archiveName = "pbatakjava-src.zip"
92-
97+
destinationDirectory = projectDir
98+
archiveBaseName = "pbatakjava-src.zip"
9399
from (projectDir) {
94100
exclude '**/.git'
95101
exclude '**/.gitignore'

0 commit comments

Comments
 (0)