https://github.com/deflatedpickle/gradle-concurnas
A Gradle plugin for Concurnas.
https://github.com/deflatedpickle/gradle-concurnas
Last synced: about 1 year ago
JSON representation
A Gradle plugin for Concurnas.
- Host: GitHub
- URL: https://github.com/deflatedpickle/gradle-concurnas
- Owner: DeflatedPickle
- License: mit
- Created: 2020-01-18T17:31:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T12:28:17.000Z (about 6 years ago)
- Last Synced: 2025-02-06T09:28:00.906Z (over 1 year ago)
- Language: Groovy
- Homepage: https://plugins.gradle.org/plugin/com.deflatedpickle.gradle.concurnas
- Size: 22.5 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gradle-concurnas
A Gradle plugin for Concurnas.
## Table Of Contents
- [Installation](#installation)
- [Requirements](#requirements)
- [Usage](#usage)
- [Extensions](#extensions)
- [Conc](#conc-extension)
- [Compiler Location](#compiler-location)
- [Concc](#concc-extension)
- [Compiler Arguments](#compiler-arguments)
- [REPL](#repl-extension)
- [REPL Arguments](#repl-arguments)
- [JVM](#jvm-extenion)
- [JVM Arguments](#jvm-arguments)
- [Tasks](#tasks)
- [CompileConc](#compileconc-task)
- [ConcInstall](#concinstall-task)
- [ConcRuntimeCache](#concruntimecache-task) ***BROKEN***
- [ConcLibCompilation](#conclibcompilation-task) ***BROKEN***
- [ConcRepl](#concrepl-task)
## Installation
Edit your plugins block to reference to this plugin by `id` and latest release version.
```groovy
plugins {
id "com.deflatedpickle.gradle.concurnas" version "0.0.2"
}
```
## Requirements
To use this plugin, you will either need to have Gradle installed, or have the Gradle cache files in your directory (such as `gradlew` or `gradlew.bat`).
You are ***NOT*** required to have Concurnas installed, as the `concInstall` task can handle that.
You ***DO*** need to either set `conc.home` or set the system environment variable, `conc_home`.
## Usage
The most basic usage of this plugin is just including the plugin. It will default to using the Concurnas compiler located in `conc_home`.
A source set will be created for `src/main/concurnas`.
## Extensions
### Conc Extension
The `conc` extension is where variables for the compiler and REPL are to be added.
#### Compiler Location
Instead of using the compiler at `conc_home`, you can customize the location like so:
```groovy
conc {
home = 'H:\\Concurnas'
}
```
***Or:***
```groovy
conc.home = 'H:\\Concurnas'
```
> The type of `home` is implemented as a `String`.
>
> If Concurnas-*.jar can't be found in the specified location (`home` or otherwise), the plugin will download the latest version to the specified file
### Concc Args
#### Compiler Arguments
The Concurnas compiler can accept multiple arguments, you can specify these from Gradle like so:
```groovy
conc {
concc {
args += '-verbose'
}
}
```
***Or:***
```groovy
conc.concc.args += '-verbose'
```
> The type of `concc.args` is implemented as a `String[]`.
### REPL Extension
#### REPL Arguments
These are arguments that are sent to the REPL (when it's run). They are given like so:
```groovy
conc {
repl {
args += '-verbose'
}
}
```
***Or:***
```groovy
conc.repl.args += '-verbose'
```
### JVM Extension
#### JVM Arguments
These are the JVM arguments that will be used both when compiling and running the REPL. You can specify them with:
```groovy
conc {
jvm {
args += '-verbose'
}
}
```
***Or:***
```groovy
conc.jvm.args += '-verbose'
```
### CompileConc Task
> Depends on: `concInstall`
The `conc` task is the main task for the plugin.
### ConcInstall Task
> Depends on: `null`
This task will check the `home` directory (supplied to the `conc` task) for a suitable Concurnas JAR.
> A suitable JAR is simply named `Concurnas-*.jar`, where `*` is the version
If a suitable JAR is ***NOT*** found, the latest release on the Concurnas GitHub repository will be downloaded and unzipped to the specified `conc.home`.
### ConcRuntimeCache Task
> Depends on: `concInstall`
This task is currently broken, you ***SHOULDN'T*** run it, but you ***SHOULD*** write a pull request if you know how to fix it!
### ConcLibCompilation Task
> Depends on: `concInstall`
This task is currently broken, you ***SHOULDN'T*** run it, but you ***SHOULD*** write a pull request if you know how to fix it!
### ConcRepl Task
> Depends on: `concInstall`
This task will launch the Concurnas REPL. It uses the arguments supplied in `conc.replArgs`.