-
Notifications
You must be signed in to change notification settings - Fork 9
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 ba4dbba
Showing
27 changed files
with
1,748 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,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 | ||
/repo/ |
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,51 @@ | ||
@Library('forge-shared-library')_ | ||
|
||
pipeline { | ||
agent { | ||
docker { | ||
image 'gradlewrapper:latest' | ||
args '-v gradlecache:/gradlecache' | ||
} | ||
} | ||
environment { | ||
GRADLE_ARGS = '-Dorg.gradle.daemon.idletimeout=5000' | ||
} | ||
|
||
stages { | ||
stage('buildandtest') { | ||
steps { | ||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue build test' | ||
script { | ||
env.MYVERSION = sh(returnStdout: true, script: './gradlew properties -q | grep "version:" | awk \'{print $2}\'').trim() | ||
} | ||
} | ||
post { | ||
success { | ||
writeChangelog(currentBuild, 'build/changelog.txt') | ||
archiveArtifacts artifacts: 'build/changelog.txt', fingerprint: false | ||
} | ||
} | ||
} | ||
stage('publish') { | ||
when { | ||
not { | ||
changeRequest() | ||
} | ||
} | ||
environment { | ||
FORGE_MAVEN = credentials('forge-maven-forge-user') | ||
} | ||
steps { | ||
sh './gradlew ${GRADLE_ARGS} publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW}' | ||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.lex.ChunkNoGoByeBye/${MYVERSION}' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
archiveArtifacts artifacts: 'build/libs/**/*.jar', fingerprint: true | ||
//junit 'build/test-results/*/*.xml' | ||
//jacoco sourcePattern: '**/src/*/java' | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,16 @@ | ||
ChunkNoGoByeBye | ||
Copyright (c) 2019. | ||
|
||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation version 2.1 | ||
of the License. | ||
|
||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
|
||
You should have received a copy of the GNU Lesser General Public | ||
License along with this library; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
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,181 @@ | ||
buildscript { | ||
repositories { | ||
maven { url = 'https://files.minecraftforge.net/maven' } | ||
jcenter() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true | ||
} | ||
} | ||
|
||
plugins { | ||
id 'net.minecrell.licenser' version '0.3' | ||
id 'org.ajoberstar.grgit' version '2.3.0' | ||
} | ||
|
||
apply plugin: 'net.minecraftforge.gradle' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'maven-publish' | ||
|
||
ext { | ||
MC_VERSION = '1.14.4' | ||
FORGE_VERSION = '28.0.17' | ||
MY_VERSION = gitVersion() | ||
MODID = 'chunknogobyebye' | ||
} | ||
|
||
version = "${MC_VERSION}-${MY_VERSION}" | ||
group = 'net.minecraftforge.lex' | ||
archivesBaseName = 'ChunkNoGoByeBye' | ||
|
||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. | ||
|
||
sourceSets { | ||
main { | ||
resources { | ||
srcDir 'src/generated/resources' | ||
} | ||
} | ||
} | ||
|
||
minecraft { | ||
mappings channel: 'snapshot', version: '20190719-1.14.3' | ||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | ||
|
||
runs { | ||
client { | ||
workingDirectory project.file('run') | ||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.console.level', 'info' | ||
|
||
mods { | ||
chunknogobyebye { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
|
||
server { | ||
workingDirectory project.file('run') | ||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.console.level', 'info' | ||
|
||
mods { | ||
chunknogobyebye { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
|
||
data { | ||
workingDirectory project.file('run') | ||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' | ||
property 'forge.logging.console.level', 'debug' | ||
|
||
args '--mod', MODID, '--all', '--output', file('src/generated/resources/') | ||
|
||
mods { | ||
chunknogobyebye { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft "net.minecraftforge:forge:${MC_VERSION}-${FORGE_VERSION}" | ||
} | ||
|
||
// Example for how to get properties into the manifest for reading by the runtime.. | ||
jar { | ||
manifest { | ||
attributes([ | ||
'Specification-Title' : 'ChunkNoGoByeBye', | ||
'Specification-Vendor' : 'LexManos', | ||
'Specification-Version' : MY_VERSION, | ||
'Implementation-Title' : project.name, | ||
'Implementation-Version' : version, | ||
'Implementation-Vendor' : 'LexManos', | ||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | ||
]) | ||
} | ||
} | ||
|
||
license { | ||
header project.file('LICENSE-header.txt') | ||
include 'net/minecraftforge/lex/**/*.java' | ||
newLine false | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
manifest.from(jar.manifest) | ||
} | ||
|
||
jar.finalizedBy('reobfJar') | ||
|
||
artifacts { | ||
archives jar | ||
archives sourcesJar | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifact jar | ||
artifact sourcesJar | ||
pom { | ||
name = project.archivesBaseName | ||
packaging = 'jar' | ||
description = 'Simple chunk loader using vanilla forceload mechanics.' | ||
url = 'https://github.com/LexManos/ChunkNoGoByeBye' | ||
|
||
scm { | ||
url = 'https://github.com/LexManos/ChunkNoGoByeBye' | ||
connection = 'scm:git:git://github.com/LexManos/ChunkNoGoByeBye.git' | ||
developerConnection = 'scm:git:git@github.com:LexManos/ChunkNoGoByeBye.git' | ||
} | ||
|
||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/LexManos/ChunkNoGoByeBye/issues' | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'LexManos' | ||
name = 'Lex Manos' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
if (project.hasProperty('forgeMavenPassword')) { | ||
credentials { | ||
username project.properties.forgeMavenUser | ||
password project.properties.forgeMavenPassword | ||
} | ||
url 'https://files.minecraftforge.net/maven/manage/upload' | ||
} else { | ||
url 'file://' + rootProject.file('repo').getAbsolutePath() | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
def gitVersion() { | ||
def raw = grgit.describe(longDescr: true) | ||
def desc = (raw == null ? 'unknown-offset-hash' : grgit.describe(longDescr: true)).split('-') as List | ||
def hash = desc.remove(desc.size() - 1) | ||
def offset = desc.remove(desc.size() - 1) | ||
def tag = desc.join('-') | ||
def branch = grgit.branch.current().name | ||
project.ext.SPEC_VERSION = tag | ||
return "${tag}.${offset}" //${t -> if (branch != 'master') t << '-' + branch}" | ||
} |
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,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 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 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip |
Oops, something went wrong.