Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Initial
  • Loading branch information
ViRb3 committed Dec 9, 2021
0 parents commit 47d5651
Show file tree
Hide file tree
Showing 16 changed files with 619 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- master

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare build
run: |
sed -i "s/{{release_branch}}/$GITHUB_REF_NAME/" .releaserc* || exit 1
mv .releaserc1.yml .releaserc.yml
- name: Setup Java JDK
uses: actions/setup-java@v2.4.0
with:
distribution: "temurin"
java-version: "16"

- name: Version
uses: cycjimmy/semantic-release-action@v2.6.0
with:
semantic_version: "18.0.0"
extra_plugins: |
@semantic-release/exec@6.0.1
env:
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}

- name: Build
run: |
sed -i "s/mod_version=.*/mod_version=$(cat .version)/" gradle.properties || exit 1
./gradlew build
mv .releaserc2.yml .releaserc.yml
- name: Release
uses: cycjimmy/semantic-release-action@v2.6.0
with:
semantic_version: "18.0.0"
env:
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
118 changes: 118 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Cache of project
.gradletasknamecache

**/build/

# Common working directory
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
10 changes: 10 additions & 0 deletions .releaserc1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
dryRun: true
branches:
- {{release_branch}}
tagFormat: v{{release_branch}}-${version}
plugins:
- "@semantic-release/commit-analyzer"
- #
- "@semantic-release/exec"
- verifyReleaseCmd: echo "${nextRelease.version}" > .version
11 changes: 11 additions & 0 deletions .releaserc2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
branches:
- {{release_branch}}
tagFormat: v{{release_branch}}-${version}
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- #
- "@semantic-release/github"
- assets:
- path: build/libs/*.jar
51 changes: 51 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
}

version = "${minecraft_version}-fabric-${mod_version}"
group = mod_id

repositories {

}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings minecraft.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

processResources {
inputs.property "version", project.version
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

def targetJavaVersion = 16
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = mod_name
withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${mod_name}" }
}
}
12 changes: 12 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
org.gradle.jvmargs=-Xmx1G
org.gradle.daemon=false

minecraft_version=1.17.1
loader_version=0.12.9
fabric_version=0.44.0+1.17

mod_name=mcmouser
mod_id=me.virb3.mcmouser
mod_description=A simple mod that disables right-click remapping on macOS.
mod_author=ViRb3
mod_version=1.0-SNAPSHOT
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 47d5651

Please sign in to comment.