Skip to content

Commit

Permalink
chore!: move to Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
LooFifteen committed Aug 30, 2024
1 parent e927c79 commit f9562a1
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 43 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/minestom-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:

concurrency: "gradle-snapshot-${{ github.ref }}"

env:
ORG_GRADLE_PROJECT_signingKeyId: "${{ secrets.SIGNING_KEY_ID }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.SIGNING_PASSWORD }}"

jobs:
snapshot:
name: "Snapshot"
Expand All @@ -14,4 +19,6 @@ jobs:
java_version: "21"
secrets:
HYPERA_SNAPSHOTS_USERNAME: "${{ secrets.HYPERA_SNAPSHOTS_USERNAME }}"
HYPERA_SNAPSHOTS_PASSWORD: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"
HYPERA_SNAPSHOTS_PASSWORD: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"
SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@
```kts
repositories {
mavenCentral()
maven("https://repo.hypera.dev/snapshots")
}

dependencies {
implementation("me.lucko.luckperms:minestom:5.4-SNAPSHOT")
implementation("dev.lu15:luckperms-minestom:5.4-SNAPSHOT")
}
```

```java
Path directory = Path.of("luckperms");
LuckPerms luckPerms = LuckPermsMinestom.builder(directory)
.commands(true) // enables registration of LuckPerms commands
.commandRegistry(CommandRegistry.minestom()) // enables registration of LuckPerms commands
.contextProvider(new DummyContextProvider()) // provide additional custom contexts
.configurationAdapter(plugin -> new MultiConfigurationAdapter(plugin, // define the configuration
new EnvironmentVariableConfigAdapter(plugin), // use MultiConfigurationAdapter to load from multiple sources, in order
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ version = '5.4-SNAPSHOT'
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'org.cadixdev.licenser'

group = 'me.lucko.luckperms'
group = 'dev.lu15'
version = '5.4-SNAPSHOT'

sourceCompatibility = 1.8
Expand Down
25 changes: 19 additions & 6 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,19 @@ publishing {
repositories {
maven {
name = 'hyperaSnapshots'
url = 'https://repo.hypera.dev/snapshots'
url = 'https://repo.hypera.dev/snapshots/'
credentials(PasswordCredentials)
}
maven {
name = 'sonatype'
url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
credentials(PasswordCredentials)
}
}

publications {
mavenJava(MavenPublication) {
artifactId = 'common'
artifactId = 'luckperms-common'

from components.java

Expand All @@ -138,16 +143,24 @@ publishing {
}

scm {
connection = 'scm:git:https://github.com/LuckPerms/LuckPerms.git'
developerConnection = 'scm:git:[email protected]:LuckPerms/LuckPerms.git'
url = 'https://github.com/LuckPerms/LuckPerms'
connection = 'scm:git:https://github.com/LooFifteen/LuckPerms.git'
developerConnection = 'scm:git:[email protected]:LooFifteen/LuckPerms.git'
url = 'https://github.com/LooFifteen/LuckPerms'
}

issueManagement {
system = 'GitHub'
url = 'https://github.com/LuckPerms/LuckPerms/issues'
url = 'https://github.com/LooFifteen/LuckPerms/issues'
}
}
}
}
}

signing {
def signingId = findProperty("signingId") as String
def signingKey = findProperty("signingKey") as String
def signingPassword = findProperty("signingPassword") as String
useInMemoryPgpKeys(signingId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 15 additions & 2 deletions minestom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,19 @@ publishing {
repositories {
maven {
name = 'hyperaSnapshots'
url = 'https://repo.hypera.dev/snapshots'
url = 'https://repo.hypera.dev/snapshots/'
credentials(PasswordCredentials)
}
maven {
name = 'sonatype'
url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
credentials(PasswordCredentials)
}
}

publications {
mavenJava(MavenPublication) {
artifactId = 'minestom'
artifactId = 'luckperms-minestom'

from components.java

Expand Down Expand Up @@ -100,4 +105,12 @@ publishing {
}
}
}
}

signing {
def signingKeyId = findProperty("signingKeyId") as String
def signingKey = findProperty("signingKey") as String
def signingPassword = findProperty("signingPassword") as String
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ public LPMinestomBootstrap(
this.schedulerAdapter = new MinestomSchedulerAdapter(this);
this.classPathAppender = new NoopClassPathAppender();
this.plugin = new LPMinestomPlugin(this, contextProviders, configurationAdapter, dependencyManager, permissionSuggestions, commandRegistry);

// we're about to move to a new artifact, we should warn the user
this.logger.warn("This is the final version of LuckPerms for Minestom on this artifact.");
this.logger.warn("Please consider moving to the new 'dev.lu15:luckperms-minestom' artifact published on both Hypera and Central repositories.");
this.logger.warn("This artifact will no longer be updated.");
}

public void onEnable() {
Expand Down
47 changes: 23 additions & 24 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,28 @@ include (
'api',
'common',
'common:loader-utils',
'bukkit',
'bukkit:loader',
'bukkit-legacy',
'bukkit-legacy:loader',
'bungee',
'bungee:loader',
'fabric',
'neoforge',
'neoforge:loader',
'neoforge:neoforge-api',
'forge',
'forge:loader',
'forge:forge-api',
// 'bukkit',
// 'bukkit:loader',
// 'bukkit-legacy',
// 'bukkit-legacy:loader',
// 'bungee',
// 'bungee:loader',
// 'fabric',
// 'neoforge',
// 'neoforge:loader',
// 'neoforge:neoforge-api',
// 'forge',
// 'forge:loader',
// 'forge:forge-api',
'minestom',
'minestom:loader',
'nukkit',
'nukkit:loader',
'sponge',
'sponge:loader',
'sponge:sponge-service',
'sponge:sponge-service-api8',
'velocity',
'standalone',
'standalone:loader',
'standalone:app'
// 'nukkit',
// 'nukkit:loader',
// 'sponge',
// 'sponge:loader',
// 'sponge:sponge-service',
// 'sponge:sponge-service-api8',
// 'velocity',
// 'standalone',
// 'standalone:loader',
// 'standalone:app'
)

0 comments on commit f9562a1

Please sign in to comment.