diff --git a/deploy.md b/deploy.md new file mode 100644 index 0000000..23301e4 --- /dev/null +++ b/deploy.md @@ -0,0 +1,97 @@ +## Publish to Maven Central + +To deploy for the first time, run the following + +```shell +export GPG_TTY=$(tty) +gpg --gen-key +gpg2 --list-keys +gpg --keyserver hkp://185.125.188.26 --send-keys XXXXXXXX # key is from --list-keys + +mvn versions:set -DnewVersion={new_version} +``` +(You need not run the commands that start with `gpg` if you already generated a key before. You would need to run `export GPG...` and `mvn version...` though) + +Make the following changes to the pom.xml + +```shell +diff --git a/pom.xml b/pom.xml +index 0cf2fe9..56ccb2e 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -110,6 +110,10 @@ + 1.6 + + ++ ++ gpg2 ++ XXXXXXXX ++ + sign-artifacts + deploy + +``` + + +Modify the `~/.m2/settings.xml` on your machine: + +```shell + + + + + + org.openclover + + + + + + + + central + xxx + xxxxx + + + +``` +Run `mvn clean deploy` to deploy. Then go to https://central.sonatype.com/publishing, find NonDex in the "Deployment" side bar (on the left), select it, and click "Publish". Running `gpgconf --kill gpg-agent` between attempts to deploy may help if gpg was interrupted. + +Last deploy was done on asedl in `~/iDFlakies-deploy`. + + +## Publish to Gradle Plugin Portal + +First, update the version in the Gradle build file - the following is the example that bumps from v2.2.1 to v2.2.5: +```shell +diff --git a/nondex-gradle-plugin/plugin/build.gradle b/nondex-gradle-plugin/plugin/build.gradle +index 464d8fe..3846757 100644 +--- a/nondex-gradle-plugin/plugin/build.gradle ++++ b/nondex-gradle-plugin/plugin/build.gradle +@@ -5,7 +5,7 @@ plugins { + } + + group = "edu.illinois" +-version = "2.2.1" ++version = "2.2.5" + + repositories { + mavenCentral() +``` + +Then modify `~/.gradle/gradle.properties` to add your API keys: +```shell +org.gradle.vfs.watch=true +gradle.publish.key=xxx +gradle.publish.secret=xxxxx +``` + +Finally, publish the NonDex Gradle plugin: +```shell +cd nondex-gradle-plugin +./gradlew publishPlugins +```