Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #48

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# FabricMC editorconfig v1.0

root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{gradle,java}]
ij_continuation_indent_size = 8
ij_java_imports_layout = $*,|,java.**,|,javax.**,|,*,|,net.fabricmc.**
ij_java_class_count_to_use_import_on_demand = 999

[*.{yml,yaml,json,toml,mcmeta}]
indent_size = 2

[*.{yml,yaml,properties}]
indent_style = space

[*.bat]
end_of_line = crlf
31 changes: 28 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
local/
# FabricMC gitignore v1.0

# Gradle
.gradle/
out/
build/
out/
classes/

# IntelliJ Idea
.idea/
*.iml
*.ipr
*.iws

# eclipse
# Eclipse
.eclipse/
*.launch

# VS Code
.vscode/
.settings/
bin/
.classpath
.project

# Fleet
.fleet/

# MacOS
*.DS_Store

# Java
hs_err_*.log
replay_*.log
*.hprof
*.jfr
27 changes: 15 additions & 12 deletions HEADER
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Copyright (c) 2016, 2017, 2018, 2019 FabricMC
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Stitch
Stitch is a set of tools for working with and updating mappings in the `.tiny` format.

Over the last few years, large parts of its functionality have been made redundant by other tools though, and nowadays, it's mostly only used for [intermediary generation and updating](https://fabricmc.net/wiki/tutorial:updating_yarn).

Preferable alternatives:
- [Mapping IO](https://github.com/FabricMC/mapping-io) for reading/writing/converting mappings
- [Name Proposal](https://github.com/FabricMC/name-proposal) for proposing names in Enigma
77 changes: 35 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
plugins {
id "java"
id "java-library"
id "maven-publish"
id "net.minecrell.licenser" version "0.4.1"
id 'java-library'
id 'maven-publish'
id 'com.diffplug.spotless'
id 'com.github.johnrengelman.shadow'
id 'checkstyle'
}

sourceCompatibility = 1.8
checkstyle {
configFile = file('checkstyle.xml')
}

def ENV = System.getenv()
version = "0.6.2" + (ENV.GITHUB_ACTIONS ? "" : "+local")
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
NebelNidas marked this conversation as resolved.
Show resolved Hide resolved

group = 'net.fabricmc'
archivesBaseName = project.name.toLowerCase()
def ENV = System.getenv()
version += (ENV.GITHUB_ACTIONS ? '' : '+local')

repositories {
mavenCentral()
Expand All @@ -30,54 +33,45 @@ configurations {
}

dependencies {
ship 'org.ow2.asm:asm:9.1'
ship 'org.ow2.asm:asm-commons:9.1'
ship 'org.ow2.asm:asm-tree:9.1'
ship 'org.ow2.asm:asm-util:9.1'
ship 'net.fabricmc:tiny-mappings-parser:0.3.0+build.17'
implementation 'com.google.guava:guava:28.0-jre'
compileOnly 'org.jetbrains:annotations:20.1.0'

enigma 'cuchaz:enigma:0.23.2'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
ship "org.ow2.asm:asm:${asm_version}"
ship "org.ow2.asm:asm-commons:${asm_version}"
ship "org.ow2.asm:asm-tree:${asm_version}"
ship "org.ow2.asm:asm-util:${asm_version}"
ship "net.fabricmc:tiny-mappings-parser:${tiny_mappings_parser_version}"
implementation "com.google.guava:guava:${guava_version}-jre"
compileOnly "org.jetbrains:annotations:${jetbrains_annotations_version}"

enigma "cuchaz:enigma:${enigma_version}"

testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}"
}

license {
header project.file("HEADER")
include "**/*.java"
spotless {
java {
licenseHeaderFile(rootProject.file('HEADER'))
}
}

jar {
manifest {
attributes 'Implementation-Title': 'Stitch',
'Implementation-Version': archiveVersion,
'Main-Class': "net.fabricmc.stitch.Main"
'Main-Class': 'net.fabricmc.stitch.Main'
}
}

task allJar(type: Jar) {
from {
configurations.ship.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Implementation-Title': 'Stitch',
'Implementation-Version': archiveVersion,
'Main-Class': "net.fabricmc.stitch.Main"
}
shadowJar {
configurations = [project.configurations.ship]
archiveClassifier = 'all'
with jar
}

java {
withSourcesJar()
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.encoding = 'UTF-8'

if (JavaVersion.current().isJava9Compatible()) {
it.options.release = 8
Expand All @@ -88,15 +82,14 @@ publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact(allJar)
}
}

// select the repositories you want to publish to
repositories {
if (ENV.MAVEN_URL) {
repositories.maven {
name "fabric"
name 'fabric'
url ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
Expand All @@ -114,7 +107,7 @@ test {
// A task to ensure that the version being released has not already been released.
task checkVersion {
doFirst {
def xml = new URL("https://maven.fabricmc.net/net/fabricmc/stitch/maven-metadata.xml").text
def xml = new URL('https://maven.fabricmc.net/net/fabricmc/stitch/maven-metadata.xml').text
def metadata = new XmlSlurper().parseText(xml)
def versions = metadata.versioning.versions.version*.text();
if (versions.contains(version)) {
Expand All @@ -123,4 +116,4 @@ task checkVersion {
}
}

publish.mustRunAfter checkVersion
publish.mustRunAfter checkVersion
Loading