Skip to content

fujaba/fulibScenarios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,354 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fulibScenarios -- ⚠️ DEPRECATED ⚠️

Java CI

Warning

fulibScenarios is deprecated. It only receives security updates because it is an important part of the fulibGradle > fulibScenarios > fulib chain. Without it, fulib's ClassModelDecorator would not be called. A future version of fulib will include the necessary glue to find and call these decorators.

A compiler for textual scenarios.

Links

  • Web App -- no longer includes fulibScenarios playground

Development

Documentation

Related Projects

Installation

Note

The following snippets are all intended to be placed in your build.gradle script.

Install the fulibGradle plugin:

plugins {
    id 'java'
    // https://plugins.gradle.org/plugin/org.fulib.fulibGradle
    id 'org.fulib.fulibGradle' version '0.5.0'

    // ...
}

Specify the version by adding the fulibScenarios dependency. Pattern matching requires fulibTables.

repositories {
   // ...
   mavenCentral()
}

dependencies {
    // ...

    // https://mvnrepository.com/artifact/org.fulib/fulibScenarios
    fulibScenarios group: 'org.fulib', name: 'fulibScenarios', version: '1.7.1'

    // optional (required for pattern matching):
    // https://mvnrepository.com/artifact/org.fulib/fulibTables
    testImplementation group: 'org.fulib', name: 'fulibTables', version: '1.4.0'
}

Usage

Scenario files are intended to be placed in the src/main/scenarios or src/test/scenarios directories, with the .md extension.

The generateScenarioSource task will process scenarios in src/main/scenarios. Generated model classes will be placed in src/main/java, while generated test classes will be placed in src/test/java.

The task generateTestScenarioSource processes scenarios in src/test/scenarios. Both model and test classes will be placed in src/test/java.

ⓘ Standard Gradle build tasks have dependencies on these tasks set up. As such, you do not have to trigger them manually, running gradle build or triggering a build via your IDE is sufficient.

In both cases, the package name depends on the directory the scenario file was in. For example, if you have the file src/main/java/org/example/MyScenario.md, generated classes and tests will use the package org.example.

⚠︎ If you have scenarios in both src/main/java and src/test/java, make sure to place them in distinct packages, e.g. org.example.model and org.example.testmodel.

License

MIT

About

fulibScenarios provides an analyzer for textual example scenarios.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors