Skip to content

Commit

Permalink
Add Forge 1.16 port, root README, common, unify versions, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
unascribed committed Oct 10, 2020
1 parent 4008fc1 commit 1d90f6f
Show file tree
Hide file tree
Showing 57 changed files with 1,384 additions and 95 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
artifacts
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ears
***Faithful fancy fashion features for fuzzy folk.***

Check out [the wiki](https://github.com/unascribed/Ears/wiki) for more info.
12 changes: 12 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

for proj in fabric-1.14 fabric-1.16 forge-1.12 forge-1.16; do
(
cd $proj
TERM=dumb chronic ./gradlew clean build
) &
done
wait
mkdir -p artifacts
cp */build/libs/* artifacts
rm artifacts/*-sources{,-dev}.jar
4 changes: 4 additions & 0 deletions common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.project
.classpath
.gradle
.settings
1 change: 1 addition & 0 deletions common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Refactor all the mods to share some amount of code.
3 changes: 3 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apply plugin: 'java-library'

sourceCompatibility = targetCompatibility = '1.8'
1 change: 1 addition & 0 deletions common/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "ears-common"
29 changes: 0 additions & 29 deletions fabric-1.14/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion fabric-1.14/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

archivesBaseName = project.archives_base_name
version = project.mod_version
version = file('../version.txt').text.trim()
group = project.maven_group

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions fabric-1.14/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.10.0+build.208

# Mod Properties
mod_version = 1.0.1
maven_group = com.unascribed
archives_base_name = ears-legacy
archives_base_name = ears-fabric-1.14

2 changes: 2 additions & 0 deletions fabric-1.14/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ pluginManagement {
gradlePluginPortal()
}
}

rootProject.name = "ears-fabric-1.14"
29 changes: 0 additions & 29 deletions fabric-1.16/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion fabric-1.16/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

archivesBaseName = project.archives_base_name
version = project.mod_version
version = file('../version.txt').text.trim()
group = project.maven_group

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions fabric-1.16/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.10.0+build.208

# Mod Properties
mod_version = 1.0.1
maven_group = com.unascribed
archives_base_name = ears
archives_base_name = ears-fabric-1.16

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
Expand Down
2 changes: 2 additions & 0 deletions fabric-1.16/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ pluginManagement {
gradlePluginPortal()
}
}

rootProject.name = "ears-fabric-1.16"
29 changes: 0 additions & 29 deletions forge-1.12/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions forge-1.12/project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ext {
projectName = 'Ears'

useElytraVersionFormat = false
version = '1.0.1'
version = file('../version.txt').text.trim()

concreteVersion = ''
concreteModules = [ ]
Expand All @@ -24,7 +24,7 @@ ext {
}

if (!ext.early) {
archivesBaseName = 'ears-forge'
archivesBaseName = 'ears-forge-1.12'

repositories {
// the skeleton already defines mavenCentral, jcenter, and the Elytra repo
Expand Down
1 change: 1 addition & 0 deletions forge-1.12/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "ears-forge-1.12"
28 changes: 28 additions & 0 deletions forge-1.14/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# gradle

.gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
.project

run/
MixinBootstrap.jar
21 changes: 21 additions & 0 deletions forge-1.14/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Una Thompson (unascribed)

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.
140 changes: 140 additions & 0 deletions forge-1.14/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url='https://dist.creeper.host/Sponge/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'

version = file('../version.txt').text.trim()
group = 'com.unascribed.ears' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'ears-forge-1.14'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

mixin {
add sourceSets.main, 'ears.refmap.json'
}

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'stable', version: "58-1.14.4"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

mods {
ears {
source sourceSets.main
}
}
}

server {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

mods {
ears {
source sourceSets.main
}
}
}

data {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'ears', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

mods {
ears {
source sourceSets.main
}
}
}
}
}

dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.14.4-28.1.92'

// You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier"
// compile "some.group:artifact:version"

// Real examples
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// These dependencies get remapped to your current MCP mappings
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

compile files('MixinBootstrap.jar')

}
// Example configuration to allow publishing using the maven-publish task
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')

jar {
manifest {
attributes(["Specification-Title": "ears",
"Specification-Vendor": "unascribed",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor": "unascribed",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "ears.mixins.json"
])
}
}
4 changes: 4 additions & 0 deletions forge-1.14/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 forge-1.14/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions forge-1.14/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
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
Loading

0 comments on commit 1d90f6f

Please sign in to comment.