-
Notifications
You must be signed in to change notification settings - Fork 1
Build deploy documentation
This document provides step-by-step instructions for building and deploying/publishing our Kotlin based IntelliJ plugin using Gradle as a build tool.
The scope of this document covers the entire process from cloning the repository to publishing the plugin to the marketplace.
Ensure the following software is installed on your machine:
git clone <repository-url>
cd amos2023ws02-pitest-ide-plugin/pitmutationmate
./gradlew build
./gradlew test
To deploy the plugin to the JetBrains Marketplace, you need to supply the Personal Access Token, which you can find on this project's JetBrains account. The account details can be requested from the members of the project. Once you have the token, set the following environment variable:
export PUBLISH_TOKEN=<your_token>
and publish the plugin via the gradle task:
cd amos2023ws02-pitest-ide-plugin/pitmutationmate
./gradlew publishPlugin
Please check JetBrains Publishing a Plugin documentation for more information and other ways of publishing the plugin.
Our IntelliJ plugin relies on a custom Gradle plugin as well as a PITest dependency which are also part of this project.
The Gradle companion plugin can be found in /pitmutationmate-override-plugin
.
To publish it you will need a gradle.publish.key
and a gradle.publish.secret
, which can be found in the the project's Gradle account. Account information can be requested from the members of the team.
Once these have been retrieved, the Gradle plugin can be published via the gradle task:
cd pitmutationmate-override-plugin
./gradlew publishPlugins -Pgradle.publish.key=<key> -Pgradle.publish.secret=<secret>
Please check Gradle's Publishing Plugins documentation for more information.
The PITest dependency coverage-reporter
can be found in /coverage-reporter
.
To publish it you will need a username and a password, which can be found in the the project's Sonatype account.
Account information can be requested from the members of the team.
Once these have been retrieved, create a gradle.properties
file and set the gradle properties ossrhUsername
and ossrhPassword
as shown below.
Then PITest dependency can be published to the Sonatype maven repository via the gradle task:
cd coverage-reporter
echo 'ossrhUsername="<username>"\nossrhPassword="<password>"' > gradle.properties
./gradlew publish
Please check Sonatype's Publishing Plugins documentation for more information.
If the build fails, check the error messages and resolve any missing dependencies or configuration issues.
- If the companion plugin or the coverage-reporter dependency were changed, run the gradle task
publishToMavenLocal
. - File/Repair IDE (you can do this for the sandbox-ide and the one you have installed locally)
- File/Invalidate Caches (you can do this for the sandbox-ide and the one you have installed locally)
- Delete all build, .gradle and .idea folders. (Also in the projects that you open with the sandbox-ide)
- Delete the ~/.gradle/caches folder.
- Check for updates in your IDEA and install them
- Install the Android plugin in the sandbox-ide (for testing android projects)
- If the companion plugin or the coverage-reporter dependency were changed, they can be tested locally by running the gradle task
publishToMavenLocal
.