Skip to content

Commit

Permalink
migrate to monumenta maven (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Floweynt authored Jul 7, 2024
1 parent bedb9b8 commit 82cab21
Show file tree
Hide file tree
Showing 78 changed files with 80 additions and 263 deletions.
49 changes: 35 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,41 @@ There are several core features provided here:
You can download the latest version of this plugin from [GitHub Packages](https://github.com/TeamMonumenta/monumenta-structure-management/packages).

## Maven dependency
Maven:
```xml
<repositories>
<repository>
<id>monumenta-structure-management</id>
<url>https://raw.githubusercontent.com/TeamMonumenta/monumenta-structure-management/master/mvn-repo/</url>
</repository>
</repositories>
<repository>
<id>monumenta</id>
<name>Monumenta Maven Repo</name>
<url>https://maven.playmonumenta.com/releases</url>
</repository>
<dependencies>
<dependency>
<groupId>com.playmonumenta</groupId>
<artifactId>structures</artifactId>
<version>10.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
Gradle (kotlin):
```kts
maven {
name = "monumenta"
url = uri("https://maven.playmonumenta.com/releases")
}

<dependencies>
<dependency>
<groupId>com.playmonumenta</groupId>
<artifactId>structures</artifactId>
<version>9.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
dependencies {
compileOnly("com.playmonumenta:structures:10.2")
}
```
Gradle (groovy):
```groovy
maven {
name "monumenta"
url "https://maven.playmonumenta.com/releases"
}
dependencies {
compileOnly "com.playmonumenta:structures:10.2"
}
```
96 changes: 45 additions & 51 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.ltgt.gradle.errorprone.errorprone
import net.ltgt.gradle.errorprone.CheckSeverity
import net.ltgt.gradle.errorprone.errorprone
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription

plugins {
java
Expand All @@ -19,43 +18,16 @@ plugins {
repositories {
mavenLocal()
mavenCentral()

maven {
url = uri("mvn-repo")
}

maven {
url = uri("https://maven.pkg.github.com/TeamMonumenta/scripted-quests/")
}

maven {
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}

maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}

maven("mvn-repo")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
// Adventure API needed by FAWE
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}

maven {
url = uri("https://jitpack.io")
}

maven {
url = uri("https://raw.githubusercontent.com/TeamMonumenta/scripted-quests/master/mvn-repo/")
}

maven {
url = uri("https://repo.maven.apache.org/maven2/")
}

maven {
url = uri("https://repo.codemc.org/repository/maven-public/")
}
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://jitpack.io")
maven("https://maven.playmonumenta.com/releases/")
maven("https://repo.maven.apache.org/maven2/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://ci.mg-dev.eu/plugin/repository/everything")
}

dependencies {
Expand All @@ -69,7 +41,6 @@ dependencies {
compileOnly("dev.jorel:commandapi-bukkit-core:9.4.1")
compileOnly("com.google.code.gson:gson:2.8.5")
compileOnly("com.playmonumenta:scripted-quests:7.0")

errorprone("com.google.errorprone:error_prone_core:2.10.0")
errorprone("com.uber.nullaway:nullaway:0.9.5")
}
Expand Down Expand Up @@ -99,17 +70,28 @@ pmd {
setIgnoreFailures(true)
}

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications.create<MavenPublication>("maven") {
project.shadow.component(this)
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/TeamMonumenta/monumenta-structure-management")
name = "MonumentaMaven"
url = when (version.toString().endsWith("SNAPSHOT")) {
true -> uri("https://maven.playmonumenta.com/snapshots")
false -> uri("https://maven.playmonumenta.com/releases")
}

credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
username = System.getenv("USERNAME")
password = System.getenv("TOKEN")
}
}
}
Expand All @@ -132,14 +114,26 @@ tasks.withType<JavaCompile>().configureEach {
/*** Disabled checks ***/
// These we almost certainly don't want
check("CatchAndPrintStackTrace", CheckSeverity.OFF) // This is the primary way a lot of exceptions are handled
check("FutureReturnValueIgnored", CheckSeverity.OFF) // This one is dumb and doesn't let you check return values with .whenComplete()
check("ImmutableEnumChecker", CheckSeverity.OFF) // Would like to turn this on but we'd have to annotate a bunch of base classes
check("LockNotBeforeTry", CheckSeverity.OFF) // Very few locks in our code, those that we have are simple and refactoring like this would be ugly
check(
"FutureReturnValueIgnored",
CheckSeverity.OFF
) // This one is dumb and doesn't let you check return values with .whenComplete()
check(
"ImmutableEnumChecker",
CheckSeverity.OFF
) // Would like to turn this on but we'd have to annotate a bunch of base classes
check(
"LockNotBeforeTry",
CheckSeverity.OFF
) // Very few locks in our code, those that we have are simple and refactoring like this would be ugly
check("StaticAssignmentInConstructor", CheckSeverity.OFF) // We have tons of these on purpose
check("StringSplitter", CheckSeverity.OFF) // We have a lot of string splits too which are fine for this use
check("MutablePublicArray", CheckSeverity.OFF) // These are bad practice but annoying to refactor and low risk of actual bugs
check(
"MutablePublicArray",
CheckSeverity.OFF
) // These are bad practice but annoying to refactor and low risk of actual bugs
check("InlineMeSuggester", CheckSeverity.OFF) // This seems way overkill
}
}

ssh.easySetup(tasks.named<ShadowJar>("shadowJar").get(), "MonumentaStructureManagement")
ssh.easySetup(tasks.shadowJar.get(), "MonumentaStructureManagement")
16 changes: 0 additions & 16 deletions buildSrc/build.gradle.kts

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions mvn-repo/com/bergerkiller/bukkit/BKCommonLib/maven-metadata.xml

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions mvn-repo/com/bergerkiller/bukkit/LightCleaner/maven-metadata.xml

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions mvn-repo/com/playmonumenta/structures/6.0/structures-6.0.pom

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions mvn-repo/com/playmonumenta/structures/6.1/structures-6.1.pom

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions mvn-repo/com/playmonumenta/structures/7.0/structures-7.0.pom

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions mvn-repo/com/playmonumenta/structures/7.1/structures-7.1.pom

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Loading

0 comments on commit 82cab21

Please sign in to comment.