mirror of
https://github.com/aNNiMON/Own-Programming-Language-Tutorial.git
synced 2024-09-20 00:34:20 +03:00
Add Gradle ownlangExec and generateMarkdownModules tasks
This commit is contained in:
parent
68570f10f1
commit
90314e0cb9
11
docs/build.gradle
Normal file
11
docs/build.gradle
Normal file
@ -0,0 +1,11 @@
|
||||
tasks.register('generateMarkdownModules') {
|
||||
group = "documentation"
|
||||
def ownlangExec = tasks.getByPath(':ownlang-desktop:ownlangExec')
|
||||
doFirst {
|
||||
ownlangExec.configure {
|
||||
workingDir '../docs/src'
|
||||
args '-f', 'docgen-md.own'
|
||||
}
|
||||
}
|
||||
finalizedBy ownlangExec
|
||||
}
|
@ -12,7 +12,7 @@ dependencies {
|
||||
implementation "org.slf4j:slf4j-simple:${versions.slf4j}"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||
|
||||
testImplementation platform("org.junit:junit-bom:")
|
||||
testImplementation platform("org.junit:junit-bom:${versions.junit}")
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,12 @@ application {
|
||||
mainClass = project.mainClassName
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Main-Class': project.mainClassName
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(":ownlang-core")
|
||||
implementation project(":ownlang-parser")
|
||||
@ -26,25 +32,33 @@ test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.register('runProgram', JavaExec) {
|
||||
group = "application"
|
||||
description = "Run sample program"
|
||||
def ownlangExec = tasks.register('ownlangExec', JavaExec) {
|
||||
dependsOn classes
|
||||
mainClass = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
ignoreExitValue true
|
||||
args '-f ../program.own'.split(' ')
|
||||
}
|
||||
|
||||
tasks.register('runOptimizing', JavaExec) {
|
||||
tasks.register('runProgram') {
|
||||
group = "application"
|
||||
description = "Run sample program"
|
||||
doFirst {
|
||||
ownlangExec.configure {
|
||||
args '-f ../program.own'.split(' ')
|
||||
}
|
||||
}
|
||||
finalizedBy ownlangExec
|
||||
}
|
||||
|
||||
tasks.register('runOptimizing') {
|
||||
group = "application"
|
||||
description = "Run sample program with optimizations and measurements"
|
||||
dependsOn classes
|
||||
mainClass = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
ignoreExitValue true
|
||||
doFirst {
|
||||
ownlangExec.configure {
|
||||
args '-o 9 -m -a -f ../program.own'.split(' ')
|
||||
}
|
||||
}
|
||||
finalizedBy ownlangExec
|
||||
}
|
||||
|
||||
tasks.register('runOptimizationDumper', JavaExec) {
|
||||
|
@ -4,6 +4,7 @@ include 'ownlang-core'
|
||||
include 'ownlang-parser'
|
||||
include 'ownlang-desktop'
|
||||
include 'ownlang-utils'
|
||||
include 'docs'
|
||||
|
||||
final def modules = ['main', 'canvasfx', 'server']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user