Skip to content

Commit 91cfcff

Browse files
feat: Initial commit
1 parent 38be54b commit 91cfcff

File tree

16 files changed

+545
-1
lines changed

16 files changed

+545
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"image": "ubuntu:latest",
44
"customizations" : {
55
"jetbrains" : {
6-
"backend" : "IntelliJ"
6+
"backend" : "IntelliJ",
7+
"plugins": [
8+
"com.demonwav.minecraft-dev"
9+
]
710
}
811
},
912
"features": {

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "⚙️ CI & Release Workflow"
2+
on:
3+
push:
4+
pull_request:
5+
types: [ opened, reopened ]
6+
7+
env:
8+
JAVA_VERSION: '23'
9+
JAVA_DISTRIBUTION: 'temurin'
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
releaser:
16+
name: "🏁 Release"
17+
if: startsWith(github.ref, 'refs/tags/')
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: "📥 Checkout Code (Full History)"
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: ☕ Setup Java ${{ env.JAVA_VERSION }}
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: ${{ env.JAVA_DISTRIBUTION }}
29+
java-version: ${{ env.JAVA_VERSION }}
30+
31+
- name: ⚡ Setup Gradle with Cache
32+
uses: gradle/actions/setup-gradle@v4
33+
34+
- name: "🚀 Publish to Maven Central"
35+
env:
36+
GPG_KEY: ${{ secrets.GPG_KEY }}
37+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
38+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
39+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
40+
run: |
41+
RAW_TAG="${GITHUB_REF##*/}"
42+
VERSION="${RAW_TAG#v}"
43+
44+
[[ "$VERSION" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1
45+
./gradlew :api:publishToCentralPortal -Pversion="$VERSION"

api/build.gradle.kts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
dependencies {
2+
api("studio.o7:octopus-plugin-api:0.0.2")
3+
}
4+
5+
information {
6+
artifactId = "cheetah-plugin-api"
7+
description = "Cheetah Paper plugin api"
8+
url = "https://o7.studio"
9+
10+
developers {
11+
developer {
12+
id = "julian-siebert"
13+
name = "Julian Siebert"
14+
email = "julian.siebert@o7.studio"
15+
}
16+
developer {
17+
id = "raphael-goetz"
18+
name = "Raphael Goetz"
19+
email = "raphael.goetz@o7.studio"
20+
}
21+
}
22+
23+
scm {
24+
connection = "scm:git:git://github.com/o7studios/cheetah-plugin.git"
25+
developerConnection = "scm:git:git@https://github.com/o7studios/cheetah-plugin.git"
26+
url = "https://github.com/o7studios/cheetah-plugin"
27+
tag = "HEAD"
28+
}
29+
30+
ciManagement {
31+
system = "GitHub Actions"
32+
url = "https://github.com/o7studios/cheetah-plugin/actions"
33+
}
34+
35+
licenses {
36+
license {
37+
name = "GNU General Public License, Version 3"
38+
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
39+
}
40+
}
41+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package studio.o7.cheetah.plugin;
2+
3+
import studio.o7.cheetah.plugin.api.Cheetah;
4+
5+
public interface PluginInstance {
6+
7+
Cheetah get();
8+
9+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package studio.o7.cheetah.plugin;
2+
3+
import lombok.Getter;
4+
import lombok.NonNull;
5+
import lombok.experimental.UtilityClass;
6+
import org.jetbrains.annotations.ApiStatus;
7+
8+
@ApiStatus.Internal
9+
@UtilityClass
10+
public class Unsafe {
11+
@Getter
12+
private PluginInstance instance;
13+
14+
void setInstance(@NonNull PluginInstance pluginInstance) {
15+
if (instance != null)
16+
throw new IllegalArgumentException("Cannot initiate plugin twice");
17+
instance = pluginInstance;
18+
}
19+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package studio.o7.cheetah.plugin.api;
2+
3+
public interface Cheetah {
4+
}

build.gradle.kts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import studio.o7.remora.RemoraPlugin
2+
3+
plugins {
4+
id("studio.o7.remora") version "0.2.5"
5+
}
6+
7+
allprojects {
8+
apply<RemoraPlugin>()
9+
10+
group = "studio.o7"
11+
12+
repositories {
13+
maven("https://repo.papermc.io/repository/maven-public/")
14+
}
15+
16+
dependencies {
17+
compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
18+
}
19+
}

gradle/wrapper/gradle-wrapper.jar

42.7 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)