Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFishCakes authored Jul 18, 2023
0 parents commit 65571e4
Show file tree
Hide file tree
Showing 17 changed files with 898 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Configure Git
run: git config --global user.email "[email protected]" && git config --global user.name "Github Actions"
- name: Apply patches
run: ./gradlew applyPatches --stacktrace
- name: Build
run: ./gradlew build --stacktrace
25 changes: 25 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Upstream
on:
schedule:
- cron: "*/15 * * * *"
jobs:
upstream:
runs-on: ubuntu-latest
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Configure Git
run: git config --global user.email "[email protected]" && git config --global user.name "Github Actions"
- name: Update upstream
run: |
./scripts/updateUpstream.sh
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# JVM crash related
core.*
hs_err_pid*

# Intellij
.idea/
*.iml
*.ipr
*.iws
out/

# Eclipse
.classpath
.project
.settings/

# netbeans
nbproject/
nbactions.xml

# Gradle
!gradle-wrapper.jar
.gradle/
build/
*/build/

# we use maven!
build.xml

# Maven
log/
target/
dependency-reduced-pom.xml

# various other potential build files
build/
bin/
dist/
manifest.mf

# Mac
.DS_Store/
.DS_Store

# vim
.*.sw[a-p]

# Linux temp files
*~

# other stuff
run/

build-data/
Tentacles-API
Tentacles-MojangAPI
Tentacles-Server
*.jar
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
The MIT License (MIT)
=====================

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Purpur]: https://purpurmc.org

## Tentacles
Template to create a mantainable fork of [Purpur].

This readme will eventually contain instructions regarding the patch system. For now, visit Purpur's [CONTRIBUTING.md](https://github.com/PurpurMC/Purpur/blob/HEAD/CONTRIBUTING.md).
128 changes: 128 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.patcher") version "1.5.5"
}

allprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
}

val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"

subprojects {
tasks.withType<JavaCompile>().configureEach {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
tasks.withType<Test> {
testLogging {
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
events(TestLogEvent.STANDARD_OUT)
}
}

repositories {
mavenCentral()
maven(paperMavenPublicUrl)
maven("https://jitpack.io")
}
}

repositories {
mavenCentral()
maven(paperMavenPublicUrl) {
content {
onlyForConfigurations(configurations.paperclip.name)
}
}
}

dependencies {
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
paperclip("io.papermc:paperclip:3.0.3")
}

paperweight {
serverProject.set(project(":tentacles-server"))

remapRepo.set(paperMavenPublicUrl)
decompileRepo.set(paperMavenPublicUrl)

useStandardUpstream("purpur") {
url.set(github("PurpurMC", "Purpur"))
ref.set(providers.gradleProperty("purpurCommit"))

withStandardPatcher {
baseName("Purpur")

apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
apiOutputDir.set(layout.projectDirectory.dir("Tentacles-API"))

serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
serverOutputDir.set(layout.projectDirectory.dir("Tentacles-Server"))
}
}
}

tasks.generateDevelopmentBundle {
apiCoordinates.set("org.purpurmc.tentacles:tentacles-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.set(
listOf(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
"https://repo.purpurmc.org/snapshots",
)
)
}

allprojects {
publishing {
repositories {
maven("https://repo.purpurmc.org/snapshots") {
name = "tentacles"
credentials(PasswordCredentials::class)
}
}
}
}

publishing {
publications.create<MavenPublication>("devBundle") {
artifact(tasks.generateDevelopmentBundle) {
artifactId = "dev-bundle"
}
}
}

tasks.register("printMinecraftVersion") {
doLast {
println(providers.gradleProperty("mcVersion").get().trim())
}
}

tasks.register("printTentaclesVersion") {
doLast {
println(project.version)
}
}
9 changes: 9 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
group = org.purpurmc.tentacles
version = 1.20.1-R0.1-SNAPSHOT

purpurCommit = ab2f1c06cef7ae6ff5f6754c87951eb406d60dbf

org.gradle.caching = true
org.gradle.parallel = true
org.gradle.vfs.watch = false
org.gradle.jvmargs = -Xmx3G
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 65571e4

Please sign in to comment.