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 "org.slf4j:slf4j-simple:${versions.slf4j}"
|
||||||
implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
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'
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,12 @@ application {
|
|||||||
mainClass = project.mainClassName
|
mainClass = project.mainClassName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes 'Main-Class': project.mainClassName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(":ownlang-core")
|
implementation project(":ownlang-core")
|
||||||
implementation project(":ownlang-parser")
|
implementation project(":ownlang-parser")
|
||||||
@ -26,26 +32,34 @@ test {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('runProgram', JavaExec) {
|
def ownlangExec = tasks.register('ownlangExec', JavaExec) {
|
||||||
group = "application"
|
|
||||||
description = "Run sample program"
|
|
||||||
dependsOn classes
|
dependsOn classes
|
||||||
mainClass = project.mainClassName
|
mainClass = project.mainClassName
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
standardInput = System.in
|
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"
|
group = "application"
|
||||||
description = "Run sample program with optimizations and measurements"
|
description = "Run sample program with optimizations and measurements"
|
||||||
dependsOn classes
|
doFirst {
|
||||||
mainClass = project.mainClassName
|
ownlangExec.configure {
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
|
||||||
ignoreExitValue true
|
|
||||||
args '-o 9 -m -a -f ../program.own'.split(' ')
|
args '-o 9 -m -a -f ../program.own'.split(' ')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finalizedBy ownlangExec
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register('runOptimizationDumper', JavaExec) {
|
tasks.register('runOptimizationDumper', JavaExec) {
|
||||||
group = "application"
|
group = "application"
|
||||||
|
@ -4,6 +4,7 @@ include 'ownlang-core'
|
|||||||
include 'ownlang-parser'
|
include 'ownlang-parser'
|
||||||
include 'ownlang-desktop'
|
include 'ownlang-desktop'
|
||||||
include 'ownlang-utils'
|
include 'ownlang-utils'
|
||||||
|
include 'docs'
|
||||||
|
|
||||||
final def modules = ['main', 'canvasfx', 'server']
|
final def modules = ['main', 'canvasfx', 'server']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user