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 912abf2
Show file tree
Hide file tree
Showing 15 changed files with 668 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
70 changes: 70 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7.+'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'

version = "${minecraft_version}-forge-${mod_version}"
group = mod_id
archivesBaseName = mod_name

java.toolchain.languageVersion = JavaLanguageVersion.of(16)

minecraft {
mappings channel: mappings_channel, version: mappings_version
}

sourceSets.main.resources {
srcDir 'src/generated/resources'
exclude 'META-INF/mods.toml'
}

processResources {
from(sourceSets.main.resources.srcDirs) {
include 'META-INF/mods.toml'

expand 'modId': mod_name, 'displayName': mod_name, 'version': mod_version,
'mcversion': minecraft_version, 'description': mod_description,
'authors': mod_author, 'forge_version': forge_version,
'minecraft_version': minecraft_version, 'loaderVersion': forge_version.split("\\.")[0]
}
}

repositories {

}

dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}

jar {
manifest {
attributes([
"Specification-Title" : mod_name,
"Specification-Vendor" : mod_author,
"Specification-Version" : mod_version,
"Implementation-Title" : mod_name,
"Implementation-Version" : mod_version,
"Implementation-Vendor" : mod_author,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

mixin {
add sourceSets.main, 'mcmouser.mixins.refmap.json'
config 'mcmouser.mixins.json'
}

jar.finalizedBy('reobfJar')
13 changes: 13 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
org.gradle.jvmargs=-Xmx1G
org.gradle.daemon=false

minecraft_version=1.17.1
mappings_channel=official
mappings_version=1.17.1
forge_version=37.1.0

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.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 912abf2

Please sign in to comment.