forked from TheCBProject/DiffPatch
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d1dfdd
Showing
37 changed files
with
3,801 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# exclude all | ||
/* | ||
|
||
# Include Important Folders | ||
!src/ | ||
|
||
# Other Files. | ||
!LICENSE.txt | ||
!README.md | ||
|
||
# Gradle stuff | ||
!gradle/ | ||
!gradlew | ||
!gradlew.bat | ||
!build.gradle | ||
!settings.gradle | ||
|
||
# Include git important files | ||
!.gitmodules | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 covers1624, Chicken-Bones | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# DiffPatch | ||
Fuzzy Diff and Patch implementation. | ||
Java port of: https://github.com/Chicken-Bones/DiffPatch | ||
With a better CLI interface. | ||
|
||
Builds can be found [here](https://maven.covers1624.net/codechicken/DiffPatch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
maven { url 'https://files.minecraftforge.net/maven' } | ||
} | ||
dependencies { | ||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+' | ||
} | ||
} | ||
|
||
plugins { | ||
id 'java' | ||
id 'maven-publish' | ||
id 'com.github.johnrengelman.shadow' version '5.2.0' | ||
} | ||
|
||
group 'codechicken' | ||
archivesBaseName = 'DiffPatch' | ||
version '1.0.0' | ||
|
||
targetCompatibility = "1.8" | ||
sourceCompatibility = "1.8" | ||
|
||
def signProps = [:] | ||
if (System.getenv("KEY_STORE")) { | ||
println "Using Env variables for jar signing." | ||
signProps['keyStore'] = System.getenv("KEY_STORE") | ||
file(System.getenv("KEY_STORE_PROPS")).withReader { | ||
def props = new Properties() | ||
props.load(it) | ||
signProps.putAll(props) | ||
} | ||
} else if (project.hasProperty('keyStore')) { | ||
println "Using Project properties for jar signing." | ||
signProps['keyStore'] = project.getProperty('keyStore') | ||
signProps['storePass'] = project.getProperty('keyStorePass') | ||
signProps['alias'] = project.getProperty('keyStoreAlias') | ||
signProps['keyPass'] = project.getProperty('keyStoreKeyPass') | ||
} else { | ||
println 'No signing secrets found, build will not be signed.' | ||
} | ||
|
||
version = "$version." + (System.getenv("BUILD_NUMBER") ?: "1") | ||
println "Starting build of ${archivesBaseName}, Version: ${version}" | ||
|
||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
configurations { | ||
shadow | ||
implementation.extendsFrom shadow | ||
} | ||
|
||
dependencies { | ||
shadow 'it.unimi.dsi:fastutil:8.3.1' | ||
shadow 'org.apache.commons:commons-lang3:3.9' | ||
shadow 'org.apache.commons:commons-compress:1.18' | ||
shadow 'org.tukaani:xz:1.8' | ||
shadow 'net.sf.jopt-simple:jopt-simple:5.0.4' | ||
} | ||
|
||
def commonManifest = { | ||
attributes 'Main-Class': 'codechicken.diffpatch.DiffPatch' | ||
} | ||
|
||
jar { | ||
manifest commonManifest | ||
from file("LICENSE.txt") | ||
} | ||
|
||
shadowJar { | ||
minimize() | ||
manifest commonManifest | ||
configurations = [project.configurations.shadow] | ||
|
||
//Include license, exclude java9 and maven things. | ||
from file("LICENSE.txt") | ||
exclude 'META-INF/maven/**' | ||
exclude 'module-info.class' | ||
|
||
//Relocate all our dependencies into a repack package. | ||
relocate 'it.unimi', 'codechicken.repack.it.unimi' | ||
relocate 'org.apache', 'codechicken.repack.org.apache' | ||
relocate 'org.tukaani', 'codechicken.repack.org.tukaani' | ||
relocate 'joptsimple', 'codechicken.repack.joptsimple' | ||
//Transform joptsimple properties files. | ||
transform(com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer) { | ||
paths << "joptsimple/ExceptionMessages.properties" | ||
paths << "joptsimple/HelpFormatterMessages.properties" | ||
keyTransformer = { key -> | ||
key.replaceAll('^(joptsimple\\..*)$', 'codechicken.repack.$1') | ||
} | ||
} | ||
} | ||
|
||
task srcJar(type: Jar) { | ||
classifier 'sources' | ||
from sourceSets.main.allSource | ||
from file("LICENSE.txt") | ||
} | ||
|
||
[shadowJar, jar].each { baseTask -> | ||
def sTask = "sign${baseTask.name.capitalize()}" | ||
baseTask.finalizedBy sTask | ||
task "$sTask"(type: net.minecraftforge.gradle.common.task.SignJar) { | ||
onlyIf { !signProps.isEmpty() } | ||
|
||
if (!signProps.isEmpty()) { | ||
keyStore = signProps.keyStore | ||
alias = signProps.alias | ||
storePass = signProps.storePass | ||
keyPass = signProps.keyPass | ||
|
||
inputFile = baseTask.archivePath | ||
outputFile = baseTask.archivePath | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
if (System.getenv('MAVEN_PASS')) { | ||
maven { | ||
url "https://maven-upload.covers1624.net/" | ||
credentials { | ||
username 'covers1624' | ||
password System.getenv('MAVEN_PASS') | ||
} | ||
} | ||
} | ||
} | ||
publications { | ||
DiffPatch(MavenPublication) { | ||
groupId project.group | ||
artifactId project.archivesBaseName | ||
version project.version | ||
from components['java'] | ||
artifact shadowJar | ||
artifact srcJar | ||
|
||
pom { | ||
name = archivesBaseName | ||
description = archivesBaseName | ||
//The publish plugin doesnt like GString's here apparently.. | ||
url = "https://github.com/TheCBProject/${archivesBaseName}".toString() | ||
scm { | ||
url = "https://github.com/TheCBProject/${archivesBaseName}".toString() | ||
connection = "scm:git:git://github.com/TheCBProject/${archivesBaseName}.git".toString() | ||
connection = "scm:git:[email protected]:TheCBProject/${archivesBaseName}.git".toString() | ||
} | ||
|
||
issueManagement { | ||
system = 'github' | ||
url = "https://github.com/TheCBProject/${archivesBaseName}/issues".toString() | ||
} | ||
licenses { | ||
license { | ||
name = "MIT" | ||
url = "https://raw.githubusercontent.com/TheCBProject/DiffPatch/master/LICENSE.txt" | ||
distribution = 'repo' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'covers1624' | ||
name = 'covers1624' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'ChickenBones' | ||
name = 'Chicken Bones' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.