diff --git a/compiler/build.gradle b/compiler/build.gradle new file mode 100644 index 000000000..25c4afc4d --- /dev/null +++ b/compiler/build.gradle @@ -0,0 +1,21 @@ +plugins { + id "org.jetbrains.kotlin.jvm" version "1.3.20" +} + +repositories { + mavenCentral() + jcenter() +} + +def kotlinVersion = '1.3.20' + +dependencies { + implementation project(':parser') + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" + runtime "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" + + testImplementation "org.jetbrains.kotlin:kotlin-test-junit5:$kotlinVersion" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2' + testImplementation 'org.hamcrest:hamcrest-junit:2.0.0.0' +} + diff --git a/parser/build.gradle b/parser/build.gradle new file mode 100644 index 000000000..3cc9417fb --- /dev/null +++ b/parser/build.gradle @@ -0,0 +1,21 @@ +plugins { + id 'antlr' + id 'java' +} + +repositories { + mavenCentral() +} + +dependencies { + antlr 'org.antlr:antlr4:4.7.2' +} + +compileJava { + dependsOn tasks.withType(AntlrTask) +} + +generateGrammarSource { + outputDirectory = file("src/prog8/parser") + arguments += ["-no-listener","-no-visitor"] +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..9eb378fba --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +include ':parser' +include ':compiler' \ No newline at end of file