Skip to content
Snippets Groups Projects
Commit 3eba2e27 authored by Konstantin Kopper's avatar Konstantin Kopper
Browse files

Created build script

parent 93aa049c
No related branches found
No related tags found
No related merge requests found
# Exclude Gradle files
.gradle/
# Exclude Gradle build output
build/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PseuCoC</name>
<name>PseuCoCo</name>
<comment></comment>
<projects>
</projects>
......
......@@ -2,3 +2,45 @@ pseuco-java-compiler
====================
You can find additional details and the compiled version on [pseuCo.com](http://pseuco.com/#/pseuco-java-compiler).
## Building instructions
The compiler uses [Gradle](https://gradle.org) as building system.
To build the compiler, just call
gradle build
This will build the project and execute all tests. The following artifacts will be created:
* `build/libs/pseuco-java-compiler-X.X.jar`
* `build/distributions/PseuCoCo-X.X.tar` - The `jar` bundled with the `include`-folder.
* `build/distributions/PseuCoCo-X.X.zip` - The `jar` bundled with the `include`-folder.
If you just want to build the project without running the tests, just call
gradle assemble
This will generate the same artifacts as before.
To generate only the `jar`-file without the distribution bundles, just call
gradle jar
### Cleanup
gradle clean
## Tests
To run the tests separately, just call
gradle test
A test report can be found in `build/reports/tests/test/index.html`
## Documentation
To generate the documentation, just call
gradle javadoc
The documentation can be found in `build/docs/javadoc/index.html`
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a commented-out sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5/userguide/tutorial_java_projects.html
*/
// Apply the java plugin to add support for Java
apply plugin: 'java'
// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
// In this section you declare the dependencies for your production and test code
dependencies {
// The production code uses the SLF4J logging API at compile time
compile 'org.slf4j:slf4j-api:1.7.22'
// Declare the dependency for your favourite test framework you want to use in your tests.
// TestNG is also supported by the Gradle Test task. Just change the
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
// 'test.useTestNG()' to your build script.
testCompile 'junit:junit:4.12'
}
description = 'PseuCo Java Compiler'
version = '2.3' // see also MainCodeGen.version
sourceSets {
main {
java {
srcDir 'src'
exclude 'codeGenTests/**'
exclude 'lexerParserTests/**'
}
}
test {
java {
srcDirs = ['src/codeGenTests', 'src/lexerParserTests']
}
}
}
jar {
manifest {
attributes('Main-Class': 'main.PseuCoCo',
'Implementation-Title': 'PseuCoCo',
'Implementation-Version': version,
'Class-Path': '.')
}
}
apply plugin: 'distribution'
distributions {
main {
baseName = 'PseuCoCo'
contents {
from jar.outputs.files
into('include') {
from 'include'
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment