This is a sample Ballerina extension for demonstration purpose, which you can use as a sample to build your own ballerina external
functions.
Template: https://github.com/ldclakmal/ballerina-extension-quickstart
Version | |
---|---|
Ballerina Language | Swan Lake Beta 3 |
Java Development Kit (JDK) | 11 |
- Refer to the Setting up Ballerina guide to download and install Ballerina.
- Clone the ballerina-connector-quickstart GitHub repository.
- Move inside to
ballerina-extension-quickstart
directory and execute$ ./gradlew build
. It should compile the source, run the tests and generates the executables.
Import the ldclakmal/extension
module into your Ballerina project and check the usage of sample max
function.
import ballerina/io;
import ldclakmal/extension;
public function main() {
int maxNo = extension:max(2, 10);
io:println(maxNo);
}