Skip to content
Alan Estrada edited this page May 30, 2019 · 29 revisions

Quickstart Guide

To use this plugin locally:

  1. Clone this repository to your local filesystem

  2. cd into the Progress-Grabl repository and run ./gradlew build

  • This will build up the jars of this plugin in Progress-Grabl/build/libs. The version number will be shown in the build log, which will look something like: Inferred project: grabl, version: 0.2.0-dev+develop.4f6aab9. This version number will be important in the next step.
  • ./gradlew build will build jars and run the unit tests. To simply build the jars, run ./gradlew assemble
  1. In your local filesystem, create a gradle standalone project.
  • This can be done by either running gradle init or by simply creating your own build.gradle in a directory.
  1. Add the folder containing the jars as a repository and add Progress-Grabl to your classpath by adding this code to your build.gradle:
    buildscript {
        repositories {
            flatDir { dirs '../Progress-Grabl/build/libs/' }
        }
        dependencies {
            // Remember to replace this version number with your own version
            classpath "io.gitlab.grabl:grabl:0.2.0-dev+develop.4f6aab9"
        }
    }
    
    allprojects {
        repositories {
            jcenter()
        }
    }
    
    apply plugin: 'io.gitlab.grabl.grabl'
  1. Now you can use the gradle tasks in that build.gradle, like so:
    // This sets some global variables to the plugin, such as propath and where 
    // rcode is stored
    abl {
        propath = files('src')
        rcodeDir = 'build/rcode'
    }
    
    // This is a default task found in the original grabl project found here: https://grabl.gitlab.io/
    compileAbl {
        source('src/abl')
        include('**/*.p')
    
        destinationDir = abl.rcodeDir
    }
    
    // This is a new task added in Progress-Grabl, all of its options match the PCT task
    // PCTCreateDatabase (found here: https://github.com/Riverside-Software/pct/wiki/PCTCreateDatabase)
    task createDb(type: io.gitlab.grabl.CreateDatabase) {
        dbName = "foofoo"
        destDir = "build"
        sourceDb = '/psc/120/dlc/sports2020.db'
        largeFiles = true
    }