Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Oct 7, 2024
0 parents commit 1b100a3
Show file tree
Hide file tree
Showing 33 changed files with 1,163 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build
on:
pull_request:
types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 20
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Update mod version
uses: christian-draeger/[email protected]
with:
path: "gradle.properties"
property: "mod_version"
value: ${{ github.event.release.tag_name }}

- name: Build and upload
uses: gradle/gradle-build-action@v2
with:
arguments: build curseforge modrinth publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
CHANGELOG: ${{ github.event.release.body }}
CI: true

- name: Upload to github releases
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
file: build/libs/atheneum_connector-${{ github.event.release.tag_name }}.jar
39 changes: 39 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Analyze
on:
push:
branches: ["[0-9]+.[0-9]+.x"]

jobs:
build:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Cache SonarQube packages
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Build and upload
uses: gradle/gradle-build-action@v2
with:
arguments: build sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project

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

# gradle
build
.gradle

# other
eclipse
run

# Files from Forge MDK
forge*changelog.txt

**.env
35 changes: 35 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Copyright (c) 2020 possible_triangle. All Rights Reserved.

Permissions are hereby granted below to any person having a copy of
this software and/or its associated files:

Usage - You may use this software for private and public use. You may use this software as a library
or integrate it with your code with the predicate being it must be downloaded from our sources and a soft or hard dependency.
Copying - You may copy this software for private use or to contribute to this software.
Modification - You may modify this software for private use or to contribute to this software.
Publishing - You may not publish copies of this software.
Distributing - You may not distribute this software.
Sublicensing - You may not sublicense this software.
Selling - You may not sell this software.

Modpack Clarification:
Permission is granted for Modpacks to include this software as long
as the copy of this software in the pack is an unmodified public copy
from our public sources and is marked as included in the Modpack.

Definition of 'Our Sources' in this license:
Our Sources in this license means a copy
of this software or its associated files that come
directly from the owners of this software, an example
are the files uploaded by us on our Curse Page.

The above copyright notice and these permission notices 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.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Atheneum Connector
75 changes: 75 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import com.expediagroup.graphql.plugin.gradle.config.GraphQLSerializer
import com.expediagroup.graphql.plugin.gradle.graphql

val mc_version: String by extra
val rabbitmq_version: String by extra
val travelers_titles_version: String by extra
val yungs_api_version: String by extra
val graphql_client_version: String by extra
val kotlin_forge_version: String by extra

plugins {
idea
id("com.possible-triangle.gradle") version ("0.1.5")
id("com.expediagroup.graphql") version ("8.1.0")
}

withKotlin()

forge {
includesLibrary("com.rabbitmq:amqp-client:$rabbitmq_version")
includesLibrary("com.expediagroup:graphql-kotlin-ktor-client:$graphql_client_version")

kotlinForgeVersion = null
}

repositories {
modrinthMaven()
}

// required because of duplicate package export
configurations.named("minecraftLibrary") {
exclude(group = "org.jetbrains", module = "annotations")
}

dependencies {
modImplementation("maven.modrinth:travelers-titles:${travelers_titles_version}")
modRuntimeOnly("maven.modrinth:yungs-api:${yungs_api_version}")

// required because of duplicate package export by thedarkcolour:kotlinforforge:all
implementation("thedarkcolour:kffmod:${kotlin_forge_version}")
implementation("thedarkcolour:kfflang:${kotlin_forge_version}")
implementation("thedarkcolour:kfflib:${kotlin_forge_version}")

//add("minecraftLibrary", "org.jetbrains.kotlin:kotlin-reflect:${kotlin.coreLibrariesVersion}")

/*
"minecraftLibrary"("com.expediagroup:graphql-kotlin-ktor-client:$graphql_client_version") {
exclude(group = "org.jetbrains.kotlinx")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
exclude(group = "org.jetbrains")
}
"jarJar"("com.expediagroup:graphql-kotlin-ktor-client:$graphql_client_version") {
jarJar.pin(this, "[${graphql_client_version},)")
}
*/
}

graphql {
client {
endpoint = "http://localhost:8080/api/graphql"
packageName = "com.possible_triangle.atheneum_connector.generated"
serializer = GraphQLSerializer.KOTLINX
}
}

enablePublishing {
githubPackages()
}

uploadToModrinth {
syncBodyFromReadme()
}

enableSonarQube()
22 changes: 22 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx2G
org.gradle.daemon=false

mc_version=1.20.1
forge_version=47.1.3

mod_id=atheneum_connector
mod_version=0.0.0-dev
release_type=release
mod_name=Atheneum Connector
mod_author=possible_triangle
maven_group=com.possible-triangle

kotlin_forge_version=4.11.0
rabbitmq_version=5.22.0
travelers_titles_version=oUSK4sOQ
yungs_api_version=PJOYAmAs
graphql_client_version=8.1.0

repository=voidshake/atheneumconnector
modrinth_project_id=WIPHNZss
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 1b100a3

Please sign in to comment.