-
Notifications
You must be signed in to change notification settings - Fork 10
Creating a project
alexstaeding edited this page Mar 2, 2020
·
7 revisions
This guide will follow the development of a project called SimplePvp and can be read as a follow-along while you are creating your plugin. The goal is to create a plugin that will track kills and deaths for each player.
Note: Unless specified, all commands are to be run in your project's root directory.
You can check your current directory with "pwd" on unix based machines or "cd" on windows.
To start working with Anvil, create a new Gradle project in your IDE of choice (we recommend IntelliJ IDEA).
- File > New > Project
- Select
Gradle - Use
Java 1.8asproject SDK - Make sure
Kotlin DSL build scriptis disabled - Make sure only
javais selected underAdditional Libraries and Frameworks - Click next
- Pick an
ArtifactIdandGroupIdfor your project (name is usually the same asArtifactId - Click finish
Note: If you are on windows, use "gradlew" instead of "./gradlew" for the rest of the guide.
You should now be looking at an empty project. The first thing we will do is update Gradle to the latest version by running the following commands in the terminal.
Note: Gradle 6.2.1 is the latest version at the time of this writing.
If there is a later one available, use that instead.
./gradlew wrapper --gradle-version 6.2.1./gradlew wrapper
Note: If you see the message "You can configure Gradle wrapper to use distribution with sources. It will provide..." above the `build.gradle` file in Intellij,
go to Preferences > Build, Execution, Deployment > Build Tools > Gradle and
set "Use Gradle from" to "'wrapper' task in Gradle build script". Click Apply and Ok to save your changes.
Please head on over to Multiplatform design to continue.