Getting started: In 3 steps to Cobol development with gradle

1. Install

To use the plugin, you need GNUCobol and Gradle.

On Ubuntu 18.10 and higher:

sudo apt install gradle gnucobol

On Arch (via yaourt):

yaourt gnu-cobol gradle

 

2. Configure your project

Create the project structure:

.
├── build.gradle  (empty)
└── settings.gradle  (empty)

Import the plugin from the provided repo (in your settings.gradle):

pluginManagement {
	repositories {
		maven {
			url 'https://sebastianruziczka.de/repo/mvn/'
		}
	}
}

Add to your build.gradle:

plugins {
     id 'de.sebastianruziczka.Cobol' version 'latest'
}

3. Run HELLOWORLD.cbl

Insert HelloWorld in src/main/cobol and run it with the single command:

gradle helloWorld

Running

Run your application with

gradle runDebug

or build an complete executable and run it with:

gradle runExecutable

Additional configuration

A minimal configuration for more than one file cobol source file:

cobol {
     srcMain = 'HelloWorld' // Path to your main file in src/main/cobol without the file extension .cbl
}

 

Additional information

 

Leave a Reply

Your email address will not be published. Required fields are marked *