Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bdew committed Jun 8, 2021
0 parents commit b0ff855
Show file tree
Hide file tree
Showing 22 changed files with 698 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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
src/generated
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2013-2021 bdew

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.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Technobauble

This mod that adds various baubles/curios.

Curseforge: https://www.curseforge.com/minecraft/mc-mods/technobauble

Jenkins: https://jenkins.bdew.net/
172 changes: 172 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
}
}

plugins {
id "com.matthewprenger.cursegradle" version "1.4.0"
}

apply plugin: 'scala'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}

if (project.hasProperty('buildnum')) {
ext.simpleVersion = "${config.mod.version}.${project.buildnum}"
} else {
ext.simpleVersion = "${config.mod.version}-DEV"
}

version = simpleVersion + '-mc' + config.minecraft.version

group = 'net.bdew'
archivesBaseName = config.mod.id

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

minecraft {
mappings channel: 'official', version: config.minecraft.version
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
register(config.mod.id) {
source sourceSets.main
}
}
}

server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
register(config.mod.id) {
source sourceSets.main
}
}
}

data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', config.mod.id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
forceExit false
mods {
register(config.mod.id) {
source sourceSets.main
}
}
}
}
}

sourceSets.main.resources {
srcDir 'src/generated/resources'
exclude '**/*.psd'
}

repositories {
maven {
name = "bdew"
url = "https://jenkins.bdew.net/maven"
}
maven {
name = "Azure-SLP"
url = uri("https://pkgs.dev.azure.com/Kotori316/minecraft/_packaging/mods/maven/v1")
content {
includeModule("com.kotori316", "ScalableCatsForce".toLowerCase())
}
}
maven {
name = "ModMaven"
url = "https://modmaven.dev"
}
repositories.stream().filter { it instanceof MavenArtifactRepository }.forEach { repo ->
repo.content {
excludeVersionByRegex(".*", ".*", ".*_mapped_snapshot_.*")
}
}
}

dependencies {
minecraft(group: 'net.minecraftforge', name: 'forge', version: "${config.minecraft.version}-${config.forge.version}")

implementation(group: 'org.scala-lang', name: 'scala-library', version: config.scala.version)
implementation(group: 'com.kotori316', name: 'ScalableCatsForce'.toLowerCase(Locale.ROOT), version: config.slp.version, classifier: 'dev')

if (findProject(":bdlib") != null) {
implementation project(":bdlib")
} else {
implementation fg.deobf("net.bdew:bdlib:${config.bdlib.version}-mc${config.minecraft.version}")
}

runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-${config.curios.version}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-${config.curios.version}:api")
}

jar {
manifest {
attributes([
"Specification-Title" : config.mod.id,
"Specification-Vendor" : "bdew",
"Specification-Version" : "1",
"Implementation-Title" : project.name,
"Implementation-Version" : simpleVersion,
"Implementation-Vendor" : "bdew",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

jar.finalizedBy('reobfJar')

publishing {
publications {
maven(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://var/www/maven"
}
}
}

curseforge {
apiKey = project.hasProperty("curseForgeApiKey") ? project.curseForgeApiKey : ""
project {
id = config.curseforge.id

releaseType = "alpha"
changelog = project.hasProperty("changelog") ? project.changelog : "No changelog available"

addGameVersion config.minecraft.version

mainArtifact(jar) {
displayName = "Technobauble ${simpleVersion} (MC ${config.minecraft.version})"
}

relations {
requiredDependency 'scalable-cats-force'
requiredDependency 'bdlib'
requiredDependency 'curios'
}
}
}
9 changes: 9 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mod.id=technobauble
mod.version=0.1.0
curseforge.id=492052
minecraft.version=1.16.5
forge.version=36.1.0
bdlib.version=1.17.0.8
scala.version=2.13.5
slp.version=2.13.5-build-1
curios.version=4.0.5.2
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
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-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit b0ff855

Please sign in to comment.