Skip to main content

Compilation

Compiling SCORE

PS: The following steps assums Drogon daemon is already up and running!

drogon compile -h
_ .-') _ _ .-') .-') _ ,---.
( ( OO) )( \( -O ) ( OO ) )| |
\ .'_ ,------. .-'),-----. ,----. .-'),-----. ,--./ ,--,' | |
,`'--..._)| /`. '( OO' .-. ' ' .-./-') ( OO' .-. '| \ | |\ | |
| | \ '| / | |/ | | | | | |_( O- )/ | | | || \| | )| |
| | ' || |_.' |\_) | |\| | | | .--, \\_) | |\| || . |/ | .'
| | / :| . '.' \ | | | |(| | '. (_/ \ | | | || |\ | `--'
| '--' /| |\ \ `' '-' ' | '--' | `' '-' '| | \ | .--.
`-------' `--' '--' `-----' `------' `-----' `--' `--' '--'
Usage: Drogon compile [options]

Compile the Drogon contracts

Options:
-p, --path [string] Path of your Drogon Project (default: "./")
-h, --help display help for command

To compile the contracts inside your src folder, you can use the drogon's built in compile sub command.

Note: you can pass in the additional gradle parameters to the compile sub command if you wish. for eg drogon compile --debug

drogon compile
_ .-') _ _ .-') .-') _ ,---.
( ( OO) )( \( -O ) ( OO ) )| |
\ .'_ ,------. .-'),-----. ,----. .-'),-----. ,--./ ,--,' | |
,`'--..._)| /`. '( OO' .-. ' ' .-./-') ( OO' .-. '| \ | |\ | |
| | \ '| / | |/ | | | | | |_( O- )/ | | | || \| | )| |
| | ' || |_.' |\_) | |\| | | | .--, \\_) | |\| || . |/ | .'
| | / :| . '.' \ | | | |(| | '. (_/ \ | | | || |\ | `--'
| '--' /| |\ \ `' '-' ' | '--' | `' '-' '| | \ | .--.
`-------' `--' '--' `-----' `------' `-----' `--' `--' '--'
โ˜ pending Compiling contracts
Downloading https://services.gradle.org/distributions/gradle-5.5.1-all.zip
..................................................................................................................................

Welcome to Gradle 5.5.1!

Here are the highlights of this release:
- Kickstart Gradle plugin development with gradle init
- Distribute organization-wide Gradle properties in custom Gradle distributions
- Transform dependency artifacts on resolution

For more details see https://docs.gradle.org/5.5.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :src:compileJava NO-SOURCE
> Task :src:processResources NO-SOURCE
> Task :src:classes UP-TO-DATE
> Task :src:jar
> Task :src:assemble
> Task :src:compileTestJava NO-SOURCE
> Task :src:processTestResources NO-SOURCE
> Task :src:testClasses UP-TO-DATE
> Task :src:test NO-SOURCE
> Task :src:check UP-TO-DATE
> Task :src:build
> Task :src:hello-world:compileJava
> Task :src:hello-world:processResources NO-SOURCE
> Task :src:hello-world:classes
> Task :src:hello-world:jar
> Task :src:hello-world:assemble
> Task :src:hello-world:compileTestJava
> Task :src:hello-world:processTestResources NO-SOURCE
> Task :src:hello-world:testClasses
> Task :src:hello-world:test
> Task :src:hello-world:check
> Task :src:hello-world:build

BUILD SUCCESSFUL in 7m 30s
5 actionable tasks: 5 executed
โœ” success Done

๐ŸŽ‰ You can find the compiled contacts inside the build folder (${project_path}/src/build/libs).

If you are not using the templating engine provider by Drogon, you can place your contracts inside the src folder inside the generated Drogon Project and you have to add your project to settings.gradle.

For example, if you have copied a contract folder named my-new-nft to src folder, the settings.gradle in the root of project folder, should look like this:

rootProject.name = 'testt'
include (
'src:my-new-nft'
)