diff --git a/.github/scripts/test-no-crash-reports.sh b/.github/scripts/test-no-crash-reports.sh new file mode 100644 index 00000000..c67e342c --- /dev/null +++ b/.github/scripts/test-no-crash-reports.sh @@ -0,0 +1,9 @@ +directory="run/crash-reports" +if [ -d $directory ]; then + echo "Crash reports detected:" + cat $directory/* + exit 1 +else + echo "No crash reports detected" + exit 0 +fi diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 00000000..6c9b3cbc --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,45 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Build and test + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Run server for 1 minute + run: | + mkdir run + echo "eula=true" > run/eula.txt + timeout 10 ./gradlew runServer || true + + - name: Test no crashes happend + run: | + chmod +x .github/scripts/test-no-crash-reports.sh + .github/scripts/test-no-crash-reports.sh diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml new file mode 100644 index 00000000..25c354b2 --- /dev/null +++ b/.github/workflows/release-tags.yml @@ -0,0 +1,45 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Release tagged build + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set release version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Release under current tag + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "${{ env.RELEASE_VERSION }}" + prerelease: false + title: "${{ env.RELEASE_VERSION }}" + files: build/libs/*.jar diff --git a/.gitignore b/.gitignore index 06e684ff..558ad12d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,28 @@ -# Eclipse +.gradle +.settings +/.idea/ +/run/ +/build/ +/eclipse/ .classpath .project -.settings/ -bin/ -eclipse/ - -# Project -.gradle/ -run/ -build/ - -# IDEA +/bin/ +/config/ +/crash-reports/ +/logs/ +options.txt +/saves/ +usernamecache.json +banned-ips.json +banned-players.json +eula.txt +ops.json +server.properties +servers.dat +usercache.json +whitelist.json +/out/ *.iml *.ipr *.iws -out/ -*.bat +src/main/resources/mixins.*.json diff --git a/.pmd b/.pmd deleted file mode 100644 index 5b0b7c84..00000000 --- a/.pmd +++ /dev/null @@ -1,1386 +0,0 @@ - - - false - .ruleset - - - UnnecessaryConstructor - Controversial - - - NullAssignment - Controversial - - - OnlyOneReturn - Controversial - - - AssignmentInOperand - Controversial - - - AtLeastOneConstructor - Controversial - - - DontImportSun - Controversial - - - SuspiciousOctalEscape - Controversial - - - CallSuperInConstructor - Controversial - - - UnnecessaryParentheses - Controversial - - - DefaultPackage - Controversial - - - BooleanInversion - Controversial - - - DataflowAnomalyAnalysis - Controversial - - - AvoidFinalLocalVariable - Controversial - - - AvoidUsingShortType - Controversial - - - AvoidUsingVolatile - Controversial - - - AvoidUsingNativeCode - Controversial - - - AvoidAccessibilityAlteration - Controversial - - - DoNotCallGarbageCollectionExplicitly - Controversial - - - OneDeclarationPerLine - Controversial - - - AvoidPrefixingMethodParameters - Controversial - - - AvoidLiteralsInIfCondition - Controversial - - - UseObjectForClearerAPI - Controversial - - - UseConcurrentHashMap - Controversial - - - IfStmtsMustUseBraces - Braces - - - IfElseStmtsMustUseBraces - Braces - - - WhileLoopsMustUseBraces - Braces - - - ForLoopsMustUseBraces - Braces - - - NoLongScripts - Basic JSP - - - NoScriptlets - Basic JSP - - - NoInlineStyleInformation - Basic JSP - - - NoClassAttribute - Basic JSP - - - NoJspForward - Basic JSP - - - IframeMissingSrcAttribute - Basic JSP - - - NoHtmlComments - Basic JSP - - - DuplicateJspImports - Basic JSP - - - JspEncoding - Basic JSP - - - NoInlineScript - Basic JSP - - - UseProperClassLoader - J2EE - - - MDBAndSessionBeanNamingConvention - J2EE - - - RemoteSessionInterfaceNamingConvention - J2EE - - - LocalInterfaceSessionNamingConvention - J2EE - - - LocalHomeNamingConvention - J2EE - - - RemoteInterfaceNamingConvention - J2EE - - - DoNotCallSystemExit - J2EE - - - StaticEJBFieldShouldBeFinal - J2EE - - - DoNotUseThreads - J2EE - - - AvoidDuplicateLiterals - String and StringBuffer - - - StringInstantiation - String and StringBuffer - - - StringToString - String and StringBuffer - - - InefficientStringBuffering - String and StringBuffer - - - UnnecessaryCaseChange - String and StringBuffer - - - UseStringBufferLength - String and StringBuffer - - - AppendCharacterWithChar - String and StringBuffer - - - ConsecutiveAppendsShouldReuse - String and StringBuffer - - - ConsecutiveLiteralAppends - String and StringBuffer - - - UseIndexOfChar - String and StringBuffer - - - InefficientEmptyStringCheck - String and StringBuffer - - - InsufficientStringBufferDeclaration - String and StringBuffer - - - UselessStringValueOf - String and StringBuffer - - - StringBufferInstantiationWithChar - String and StringBuffer - - - UseEqualsToCompareStrings - String and StringBuffer - - - AvoidStringBufferField - String and StringBuffer - - - ReplaceVectorWithList - Migration - - - ReplaceHashtableWithMap - Migration - - - ReplaceEnumerationWithIterator - Migration - - - AvoidEnumAsIdentifier - Migration - - - AvoidAssertAsIdentifier - Migration - - - IntegerInstantiation - Migration - - - ByteInstantiation - Migration - - - ShortInstantiation - Migration - - - LongInstantiation - Migration - - - JUnit4TestShouldUseBeforeAnnotation - Migration - - - JUnit4TestShouldUseAfterAnnotation - Migration - - - JUnit4TestShouldUseTestAnnotation - Migration - - - JUnit4SuitesShouldUseSuiteAnnotation - Migration - - - JUnitUseExpected - Migration - - - AvoidDeeplyNestedIfStmts - Basic Velocity - - - CollapsibleIfStatements - Basic Velocity - - - ExcessiveTemplateLength - Basic Velocity - - - AvoidReassigningParameters - Basic Velocity - - - EmptyIfStmt - Basic Velocity - - - EmptyForeachStmt - Basic Velocity - - - UnusedMacroParameter - Basic Velocity - - - NoInlineJavaScript - Basic Velocity - - - NoInlineStyles - Basic Velocity - - - AssignmentInOperand - Controversial - - - UnreachableCode - Basic Ecmascript - - - InnaccurateNumericLiteral - Basic Ecmascript - - - ConsistentReturn - Basic Ecmascript - - - ScopeForInVariable - Basic Ecmascript - - - EqualComparison - Basic Ecmascript - - - GlobalVariable - Basic Ecmascript - - - AvoidTrailingComma - Basic Ecmascript - - - UseBaseWithParseInt - Basic Ecmascript - - - UseUtilityClass - Design - - - SimplifyBooleanReturns - Design - - - SimplifyBooleanExpressions - Design - - - SwitchStmtsShouldHaveDefault - Design - - - AvoidDeeplyNestedIfStmts - Basic Velocity - - - AvoidReassigningParameters - Basic Velocity - - - SwitchDensity - Design - - - ConstructorCallsOverridableMethod - Design - - - AccessorClassGeneration - Design - - - FinalFieldCouldBeStatic - Design - - - CloseResource - Design - - - NonStaticInitializer - Design - - - DefaultLabelNotLastInSwitchStmt - Design - - - NonCaseLabelInSwitchStatement - Design - - - OptimizableToArrayCall - Design - - - BadComparison - Design - - - EqualsNull - Design - - - ConfusingTernary - Design - - - InstantiationToGetClass - Design - - - IdempotentOperations - Design - - - SimpleDateFormatNeedsLocale - Design - - - ImmutableField - Design - - - UseLocaleWithCaseConversions - Design - - - AvoidProtectedFieldInFinalClass - Design - - - AssignmentToNonFinalStatic - Design - - - MissingStaticMethodInNonInstantiatableClass - Design - - - AvoidSynchronizedAtMethodLevel - Design - - - MissingBreakInSwitch - Design - - - UseNotifyAllInsteadOfNotify - Design - - - AvoidInstanceofChecksInCatchClause - Design - - - AbstractClassWithoutAbstractMethod - Design - - - SimplifyConditional - Design - - - CompareObjectsWithEquals - Design - - - PositionLiteralsFirstInComparisons - Design - - - PositionLiteralsFirstInCaseInsensitiveComparisons - Design - - - UnnecessaryLocalBeforeReturn - Design - - - NonThreadSafeSingleton - Design - - - UncommentedEmptyMethod - Design - - - UncommentedEmptyConstructor - Design - - - AvoidConstantsInterface - Design - - - UnsynchronizedStaticDateFormatter - Design - - - PreserveStackTrace - Design - - - UseCollectionIsEmpty - Design - - - ClassWithOnlyPrivateConstructorsShouldBeFinal - Design - - - EmptyMethodInAbstractClassShouldBeAbstract - Design - - - SingularField - Design - - - ReturnEmptyArrayRatherThanNull - Design - - - AbstractClassWithoutAnyMethod - Design - - - TooFewBranchesForASwitchStatement - Design - - - LogicInversion - Design - - - UseVarargs - Design - - - FieldDeclarationsShouldBeAtStartOfClass - Design - - - GodClass - Design - - - AvoidProtectedMethodInFinalClassNotExtending - Design - - - AvoidCatchingThrowable - Strict Exceptions - - - SignatureDeclareThrowsException - Strict Exceptions - - - ExceptionAsFlowControl - Strict Exceptions - - - AvoidCatchingNPE - Strict Exceptions - - - AvoidThrowingRawExceptionTypes - Strict Exceptions - - - AvoidThrowingNullPointerException - Strict Exceptions - - - AvoidRethrowingException - Strict Exceptions - - - DoNotExtendJavaLangError - Strict Exceptions - - - DoNotThrowExceptionInFinally - Strict Exceptions - - - AvoidThrowingNewInstanceOfSameException - Strict Exceptions - - - AvoidCatchingGenericException - Strict Exceptions - - - AvoidLosingExceptionInformation - Strict Exceptions - - - NPathComplexity - Code Size - - - ExcessiveMethodLength - Code Size - - - ExcessiveParameterList - Code Size - - - ExcessiveObjectLength - Code Size - - - ExcessiveTypeLength - Code Size - - - ExcessivePackageBodyLength - Code Size - - - ExcessivePackageSpecificationLength - Code Size - - - CyclomaticComplexity - Code Size - - - TooManyFields - Code Size - - - NcssMethodCount - Code Size - - - NcssObjectCount - Code Size - - - TooManyMethods - Code Size - - - UnnecessaryParentheses - Controversial - - - UnnecessaryBlock - Unnecessary - - - ShortVariable - Naming - - - LongVariable - Naming - - - ShortMethodName - Naming - - - VariableNamingConventions - Naming - - - MethodNamingConventions - Naming - - - ClassNamingConventions - Naming - - - AbstractNaming - Naming - - - AvoidDollarSigns - Naming - - - MethodWithSameNameAsEnclosingClass - Naming - - - SuspiciousHashcodeMethodName - Naming - - - SuspiciousConstantFieldName - Naming - - - SuspiciousEqualsMethodName - Naming - - - AvoidFieldNameMatchingTypeName - Naming - - - AvoidFieldNameMatchingMethodName - Naming - - - NoPackage - Naming - - - PackageCase - Naming - - - MisleadingVariableName - Naming - - - BooleanGetMethodName - Naming - - - ShortClassName - Naming - - - GenericsNaming - Naming - - - UnusedPrivateField - Unused Code - - - UnusedLocalVariable - Unused Code - - - UnusedPrivateMethod - Unused Code - - - UnusedFormalParameter - Unused Code - - - UnusedModifier - Unused Code - - - NPathComplexity - Code Size - - - ExcessiveMethodLength - Code Size - - - ExcessiveParameterList - Code Size - - - ExcessiveClassLength - Code Size - - - CyclomaticComplexity - Code Size - - - ExcessivePublicCount - Code Size - - - TooManyFields - Code Size - - - NcssMethodCount - Code Size - - - NcssTypeCount - Code Size - - - NcssConstructorCount - Code Size - - - TooManyMethods - Code Size - - - MoreThanOneLogger - Java Logging - - - LoggerIsNotStaticFinal - Java Logging - - - SystemPrintln - Java Logging - - - AvoidPrintStackTrace - Java Logging - - - GuardLogStatementJavaUtil - Java Logging - - - BeanMembersShouldSerialize - JavaBeans - - - MissingSerialVersionUID - JavaBeans - - - TomKytesDespair - Tom Kyte's Despair - - - UseCorrectExceptionLogging - Jakarta Commons Logging - - - ProperLogger - Jakarta Commons Logging - - - GuardDebugLogging - Jakarta Commons Logging - - - GuardLogStatement - Jakarta Commons Logging - - - CouplingBetweenObjects - Coupling - - - ExcessiveImports - Coupling - - - LooseCoupling - Coupling - - - LoosePackageCoupling - Coupling - - - LawOfDemeter - Coupling - - - TO_DATEWithoutDateFormat - PLSQL DATETIME - - - TO_DATE_TO_CHAR - PLSQL DATETIME - - - TO_TIMESTAMPWithoutDateFormat - PLSQL DATETIME - - - LocalVariableCouldBeFinal - Optimization - - - MethodArgumentCouldBeFinal - Optimization - - - AvoidInstantiatingObjectsInLoops - Optimization - - - UseArrayListInsteadOfVector - Optimization - - - SimplifyStartsWith - Optimization - - - UseStringBufferForStringAppends - Optimization - - - UseArraysAsList - Optimization - - - AvoidArrayLoops - Optimization - - - UnnecessaryWrapperObjectCreation - Optimization - - - AddEmptyString - Optimization - - - RedundantFieldInitializer - Optimization - - - PrematureDeclaration - Optimization - - - DuplicateImports - Import Statements - - - DontImportJavaLang - Import Statements - - - UnusedImports - Import Statements - - - ImportFromSamePackage - Import Statements - - - TooManyStaticImports - Import Statements - - - UnnecessaryFullyQualifiedName - Import Statements - - - JUnitStaticSuite - JUnit - - - JUnitSpelling - JUnit - - - JUnitAssertionsShouldIncludeMessage - JUnit - - - JUnitTestsShouldIncludeAssert - JUnit - - - TestClassWithoutTestCases - JUnit - - - UnnecessaryBooleanAssertion - JUnit - - - UseAssertEqualsInsteadOfAssertTrue - JUnit - - - UseAssertSameInsteadOfAssertTrue - JUnit - - - UseAssertNullInsteadOfAssertTrue - JUnit - - - SimplifyBooleanAssertion - JUnit - - - JUnitTestContainsTooManyAsserts - JUnit - - - UseAssertTrueInsteadOfAssertEquals - JUnit - - - DontNestJsfInJstlIteration - Basic JSF - - - EmptyFinalizer - Finalizer - - - FinalizeOnlyCallsSuperFinalize - Finalizer - - - FinalizeOverloaded - Finalizer - - - FinalizeDoesNotCallSuperFinalize - Finalizer - - - FinalizeShouldBeProtected - Finalizer - - - AvoidCallingFinalize - Finalizer - - - IfStmtsMustUseBraces - Braces - - - WhileLoopsMustUseBraces - Braces - - - IfElseStmtsMustUseBraces - Braces - - - ForLoopsMustUseBraces - Braces - - - UseConcatOnce - XPath in XSL - - - AvoidAxisNavigation - XPath in XSL - - - JumbledIncrementer - Basic - - - ForLoopShouldBeWhileLoop - Basic - - - OverrideBothEqualsAndHashcode - Basic - - - DoubleCheckedLocking - Basic - - - ReturnFromFinallyBlock - Basic - - - UnconditionalIfStatement - Basic - - - BooleanInstantiation - Basic - - - CollapsibleIfStatements - Basic Velocity - - - ClassCastExceptionWithToArray - Basic - - - AvoidDecimalLiteralsInBigDecimalConstructor - Basic - - - MisplacedNullCheck - Basic - - - AvoidThreadGroup - Basic - - - BrokenNullCheck - Basic - - - BigIntegerInstantiation - Basic - - - AvoidUsingOctalValues - Basic - - - AvoidUsingHardCodedIP - Basic - - - CheckResultSet - Basic - - - AvoidMultipleUnaryOperators - Basic - - - ExtendsObject - Basic - - - CheckSkipResult - Basic - - - AvoidBranchingStatementAsLastInLoop - Basic - - - DontCallThreadRun - Basic - - - DontUseFloatTypeForLoopIndices - Basic - - - EmptyCatchBlock - Empty Code - - - EmptyIfStmt - Basic Velocity - - - EmptyWhileStmt - Empty Code - - - EmptyTryBlock - Empty Code - - - EmptyFinallyBlock - Empty Code - - - EmptySwitchStatements - Empty Code - - - EmptySynchronizedBlock - Empty Code - - - EmptyStatementNotInLoop - Empty Code - - - EmptyInitializer - Empty Code - - - EmptyStatementBlock - Empty Code - - - EmptyStaticInitializer - Empty Code - - - UnnecessaryConversionTemporary - Unnecessary - - - UnnecessaryReturn - Unnecessary - - - UnnecessaryFinalModifier - Unnecessary - - - UselessOverridingMethod - Unnecessary - - - UselessOperationOnImmutable - Unnecessary - - - UnusedNullCheckInEquals - Unnecessary - - - UselessParentheses - Unnecessary - - - ProperCloneImplementation - Clone Implementation - - - CloneThrowsCloneNotSupportedException - Clone Implementation - - - CloneMethodMustImplementCloneable - Clone Implementation - - - UnnecessaryConversionTemporary - Unnecessary - - - UnnecessaryReturn - Unnecessary - - - UnnecessaryFinalModifier - Unnecessary - - - UselessOverridingMethod - Unnecessary - - - UselessOperationOnImmutable - Unnecessary - - - UnusedNullCheckInEquals - Unnecessary - - - UselessParentheses - Unnecessary - - - CommentRequired - Comments - - - CommentSize - Comments - - - CommentContent - Comments - - - CallSuperFirst - Android - - - CallSuperLast - Android - - - DoNotHardCodeSDCard - Android - - - EmptyCatchBlock - Empty Code - - - EmptyIfStmt - Basic Velocity - - - EmptyWhileStmt - Empty Code - - - EmptyTryBlock - Empty Code - - - EmptyFinallyBlock - Empty Code - - - EmptySwitchStatements - Empty Code - - - EmptySynchronizedBlock - Empty Code - - - EmptyStatementNotInLoop - Empty Code - - - EmptyInitializer - Empty Code - - - EmptyStatementBlock - Empty Code - - - EmptyStaticInitializer - Empty Code - - - MethodReturnsInternalArray - Security Code Guidelines - - - ArrayIsStoredDirectly - Security Code Guidelines - - - MistypedCDATASection - Basic XML - - - false - true - true - diff --git a/Downloads.txt b/Downloads.txt deleted file mode 100644 index 69b2c6a6..00000000 --- a/Downloads.txt +++ /dev/null @@ -1,497 +0,0 @@ -{ - "Recommended": { - "1.7.10": { - "Release 1.8.2": { - "links": [ - "cf 2244398" - ] - } - } - }, - - "Old Versions": { - "1.7.10": { - "Release 1.8.1": { - "links": [ - "cf 2240590" - ] - }, - - "Beta 1.8.1": { - "links": [ - "cf 2235243" - ] - }, - - "Release 1.8": { - "links": [ - "cf 2232515" - ] - }, - - "Release 1.7.1": { - "links": [ - "cf 2228342" - ] - }, - - "Release 1.7": { - "links": [ - "cf 2228291" - ] - }, - - "Release 1.6.7": { - "links": [ - "admf c1vtihp24g51mpy/HEE_1.7.10_release-1.6.7.zip", - "mf c1vtihp24g51mpy/HEE_1.7.10_release-1.6.7.zip" - ] - }, - - "Release 1.6.6": { - "links": [ - "admf jobq5vldo3o5oaa/HEE_1.7.10_release-1.6.6.zip", - "mf jobq5vldo3o5oaa/HEE_1.7.10_release-1.6.6.zip" - ] - }, - - "Release 1.6.5": { - "links": [ - "admf 6aki10d0mfmsj3i/HEE_1.7.10_release-1.6.5.zip", - "mf 6aki10d0mfmsj3i/HEE_1.7.10_release-1.6.5.zip" - ] - }, - - "Release 1.6.4": { - "links": [ - "admf 19yjbri2lyrug3t/HEE_1.7.10_release-1.6.4.zip", - "mf 19yjbri2lyrug3t/HEE_1.7.10_release-1.6.4.zip" - ] - }, - - "Release 1.6.3": { - "links": [ - "admf pk66s3w1904q8f9/HEE_1.7.10_release-1.6.3.zip", - "mf pk66s3w1904q8f9/HEE_1.7.10_release-1.6.3.zip" - ] - }, - - "Release 1.6.2": { - "links": [ - "admf n88a6im6cvjjfr6/HEE_1.7.10_release-1.6.2.zip", - "mf n88a6im6cvjjfr6/HEE_1.7.10_release-1.6.2.zip" - ] - }, - - "Beta 1.6.2": { - "links": [ - "admf gvpb5ya597jsh13/HEE_1.7.10_pre-release-1.6.2.zip", - "mf gvpb5ya597jsh13/HEE_1.7.10_pre-release-1.6.2.zip" - ] - } - }, - - "1.7.2": { - "Release 1.6.1": { - "links": [ - "admf coh2ga33qwbh41e/HEE_1.7.2_release-1.6.1.zip", - "mf coh2ga33qwbh41e/HEE_1.7.2_release-1.6.1.zip" - ] - }, - - "Release 1.6": { - "links": [ - "admf y1oqm5cn5gd49je/HEE_1.7.2_release-1.6.zip", - "mf y1oqm5cn5gd49je/HEE_1.7.2_release-1.6.zip" - ] - }, - - "Release 1.5a": { - "links": [ - "admf i7s6bra8bjmschh/HEE_1.7.2_release-1.5a.zip", - "mf i7s6bra8bjmschh/HEE_1.7.2_release-1.5a.zip" - ] - }, - - "Beta 1.5": { - "links": [ - "admf rr5q8511cretnql/HEE_1.7.2_beta-1.5.zip", - "mf rr5q8511cretnql/HEE_1.7.2_beta-1.5.zip" - ] - } - }, - - "1.6.4": { - "Release 1.6.1": { - "links": [ - "admf ock52265820530c/HEE_1.6.4_release-1.6.1.zip", - "mf ock52265820530c/HEE_1.6.4_release-1.6.1.zip" - ] - }, - - "Release 1.6": { - "links": [ - "admf yobl3eycmsweh7x/HEE_1.6.4_release-1.6.zip", - "mf yobl3eycmsweh7x/HEE_1.6.4_release-1.6.zip" - ] - }, - - "Release 1.5a": { - "links": [ - "admf 83mijmd3mpmpr64/HEE_1.6.4_release-1.5a.zip", - "mf 83mijmd3mpmpr64/HEE_1.6.4_release-1.5a.zip" - ] - }, - - "Release 1.4.3": { - "links": [ - "admf ks7uyussqkdkq7k/HEE_1.6.4_release-1.4.3.zip", - "mf ks7uyussqkdkq7k/HEE_1.6.4_release-1.4.3.zip" - ] - }, - - "Release 1.4.2": { - "links": [ - "admf yqjdvdrt2s1x78b/HEE_1.6.4_release-1.4.2.zip", - "mf yqjdvdrt2s1x78b/HEE_1.6.4_release-1.4.2.zip" - ] - }, - - "Release 1.4.1": { - "links": [ - "admf bllbsqse5tq3xr4/HEE_1.6.4_release-1.4.1.zip", - "mf bllbsqse5tq3xr4/HEE_1.6.4_release-1.4.1.zip" - ] - }, - - "Release 1.4": { - "links": [ - "admf 5ic2w6cevff6uob/HEE_1.6.4_release-1.4.zip", - "mf 5ic2w6cevff6uob/HEE_1.6.4_release-1.4.zip" - ] - }, - - "Release 1.3.3": { - "links": [ - "admf 12m382n6ect82fq/HEE_1.6.4_release-1.3.3.zip", - "mf 12m382n6ect82fq/HEE_1.6.4_release-1.3.3.zip" - ] - }, - - "Release 1.3.2": { - "links": [ - "admf a5o5cmf23l8q8cc/HEE_1.6.4_release-1.3.2.zip", - "mf a5o5cmf23l8q8cc/HEE_1.6.4_release-1.3.2.zip" - ] - }, - - "Release 1.3.1": { - "links": [ - "admf ktialamhxh2fvay/HEE_1.6.4_release-1.3.1.zip", - "mf ktialamhxh2fvay/HEE_1.6.4_release-1.3.1.zip" - ] - }, - - "Release 1.3": { - "links": [ - "admf wfugb8avrcyfvob/HEE_1.6.4_release-1.3.zip", - "mf wfugb8avrcyfvob/HEE_1.6.4_release-1.3.zip" - ] - }, - - "Release 1.2.2": { - "links": [ - "admf ao3pclo9zw9w4y9/HEE_1.6.4_release-1.2.2.zip", - "mf ao3pclo9zw9w4y9/HEE_1.6.4_release-1.2.2.zip" - ] - }, - - "Release 1.2.1": { - "links": [ - "admf y4685tybfg5p50w/HEE_1.6.4_release-1.2.1.zip", - "mf y4685tybfg5p50w/HEE_1.6.4_release-1.2.1.zip" - ] - }, - - "Beta 1.2": { - "search": "Pre-release 1.2 (1.6.4)", - "links": [ - "admf 77av6u748kiob35/HEE_1.6.4_pre-release-1.2.zip", - "mf 77av6u748kiob35/HEE_1.6.4_pre-release-1.2.zip" - ] - }, - - "Release 1.1.2": { - "links": [ - "admf 6x66uw80998n9ci/HEE_1.6.4_release-1.1.2.zip", - "mf 6x66uw80998n9ci/HEE_1.6.4_release-1.1.2.zip" - ] - }, - - "Release 1.1.1": { - "links": [ - "admf 3je46x62m2kyunc/HEE_1.6.4_release-1.1.1.zip", - "mf 3je46x62m2kyunc/HEE_1.6.4_release-1.1.1.zip" - ] - }, - - "Release 1.1": { - "links": [ - "admf ko7unhzj8qp5w93/HED_1.6.4_release-1.1.0.zip", - "mf ko7unhzj8qp5w93/HED_1.6.4_release-1.1.0.zip" - ] - }, - - "Release 1.0.1": { - "links": [ - "admf 6xw79s4ioveaam1/HED_1.6.4_release-1.0.1.zip", - "mf 6xw79s4ioveaam1/HED_1.6.4_release-1.0.1.zip" - ] - } - }, - - "1.6.2": { - "Release 1.0": { - "links": [ - "admf 3oms4btbot6xkc1/HED_1.6.2_release-1.0.zip", - "mf 3oms4btbot6xkc1/HED_1.6.2_release-1.0.zip" - ] - }, - - "Beta 2": { - "search": "Pre-release 2 (1.6.2)", - "links": [ - "admf 0c44icuiv8bia07/HED_1.6.2_pre-release-2.zip", - "mf 0c44icuiv8bia07/HED_1.6.2_pre-release-2.zip" - ] - }, - - "Beta 1": { - "search": "Pre-release 1 (1.6.2)", - "links": [ - "admf 7kn8391a52c24ch/HED_1.6.2_pre-release-1.zip", - "mf 7kn8391a52c24ch/HED_1.6.2_pre-release-1.zip" - ] - } - } - }, - - "Old Beta Versions": { - "1.6.2": { - "Beta 12": { - "links": [ - "admf 67xdm4um4cb2du9/HardcoreEnderdragon_1.6.2_beta12.zip", - "mf 67xdm4um4cb2du9/HardcoreEnderdragon_1.6.2_beta12.zip" - ] - } - }, - - "1.5.2": { - "Beta 11 (Client)": { - "search": "Beta 11 (1.5.2)", - "links": [ - "admf 4cowjlb86c7fl94/HardcoreEnderdragon_1.5.2_beta11_SSP.zip", - "mf 4cowjlb86c7fl94/HardcoreEnderdragon_1.5.2_beta11_SSP.zip" - ] - }, - - "Beta 11 (Server)": { - "search": "Beta 11 (1.5.2)", - "links": [ - "admf 8bd6z603t4s09c5/HardcoreEnderdragon_1.5.2_beta11_SMP.zip", - "mf 8bd6z603t4s09c5/HardcoreEnderdragon_1.5.2_beta11_SMP.zip" - ] - } - }, - - "1.5.1": { - "Beta 10 (Client)": { - "search": "Beta 10 (1.5.1)", - "links": [ - "admf 4cowjlb86c7fl94/HardcoreEnderdragon_1.5.2_beta11_SSP.zip", - "mf 4cowjlb86c7fl94/HardcoreEnderdragon_1.5.2_beta11_SSP.zip" - ] - }, - - "Beta 10 (Server)": { - "search": "Beta 10 (1.5.1)", - "links": [ - "admf 8bd6z603t4s09c5/HardcoreEnderdragon_1.5.2_beta11_SMP.zip", - "mf 8bd6z603t4s09c5/HardcoreEnderdragon_1.5.2_beta11_SMP.zip" - ] - } - }, - - "1.4.7": { - "Beta 9 (Client)": { - "search": "Beta 9 (1.4.7)", - "links": [ - "admf 47um73u6b9fmxbb/HardcoreEnderdragon_1.4.7_beta9_SSP.zip", - "mf 47um73u6b9fmxbb/HardcoreEnderdragon_1.4.7_beta9_SSP.zip" - ] - }, - - "Beta 9 (Server)": { - "search": "Beta 9 (1.4.7)", - "links": [ - "admf to1ht6wistt2wsl/HardcoreEnderdragon_1.4.7_beta9_SMP.zip", - "mf to1ht6wistt2wsl/HardcoreEnderdragon_1.4.7_beta9_SMP.zip" - ] - } - }, - - "1.4.6": { - "Beta 8 (Client)": { - "search": "Beta 8 (1.4.6)", - "links": [ - "admf zz8n6nnnyru749a/HardcoreEnderdragon_1.4.6_beta8_SSP.zip", - "mf zz8n6nnnyru749a/HardcoreEnderdragon_1.4.6_beta8_SSP.zip" - ] - }, - - "Beta 8 (Server)": { - "search": "Beta 8 (1.4.6)", - "links": [ - "admf 78jigw52a0nv61v/HardcoreEnderdragon_1.4.6_beta8_SMP.zip", - "mf 78jigw52a0nv61v/HardcoreEnderdragon_1.4.6_beta8_SMP.zip" - ] - } - }, - - "1.3.1": { - "Beta 7 (Client)": { - "search": "Beta 7 (1.3.1)", - "links": [ - "admf a4npmm8jlv0d0ht/HardcoreEnderdragon_1.3.1_beta7_SSP.zip", - "mf a4npmm8jlv0d0ht/HardcoreEnderdragon_1.3.1_beta7_SSP.zip" - ] - } - }, - - "1.2.5": { - "Beta 6 (Client)": { - "search": "Beta 6 (1.2.5)", - "links": [ - "admf rbstt8zb6ied5z3/HardcoreEnderdragon_1.2.5_beta6_SSP.zip", - "mf rbstt8zb6ied5z3/HardcoreEnderdragon_1.2.5_beta6_SSP.zip" - ] - }, - - "Beta 6 (Server)": { - "search": "Beta 6 (1.2.5)", - "links": [ - "admf y2voe2h141jmxgx/HardcoreEnderdragon_1.2.5_beta6_SMP.zip", - "mf y2voe2h141jmxgx/HardcoreEnderdragon_1.2.5_beta6_SMP.zip" - ] - }, - - "Beta 6 (VC Server)": { - "search": "Beta 6 (1.2.5)", - "links": [ - "admf 222l7dodo581v8z/HardcoreEnderdragon_1.2.5_beta6_SMP_C.zip", - "mf 222l7dodo581v8z/HardcoreEnderdragon_1.2.5_beta6_SMP_C.zip" - ] - }, - - "Beta 5 (Client)": { - "search": "Beta 5 (1.2.5)", - "links": [ - "admf 52o3vvdc84vhjzb/HardcoreEnd_beta5_1.2.5_SSP.zip", - "mf 52o3vvdc84vhjzb/HardcoreEnd_beta5_1.2.5_SSP.zip" - ] - }, - - "Beta 5 (Server)": { - "search": "Beta 5 (1.2.5)", - "links": [ - "admf qzqf0j1ddw700o4/HardcoreEnd_beta5_1.2.5_SMP.zip", - "mf qzqf0j1ddw700o4/HardcoreEnd_beta5_1.2.5_SMP.zip" - ] - }, - - "Beta 5 (VC Server)": { - "search": "Beta 5 (1.2.5)", - "links": [ - "admf quddg71y2368oyr/HardcoreEnd_beta5_1.2.5_SMP_C.zip", - "mf quddg71y2368oyr/HardcoreEnd_beta5_1.2.5_SMP_C.zip" - ] - }, - - "Beta 4 (Client)": { - "search": "Beta 4 (1.2.5)", - "links": [ - "admf 2cd9c6ed3cy6fj8/HardcoreEnd_beta4_1.2.5_SSP.zip", - "mf 2cd9c6ed3cy6fj8/HardcoreEnd_beta4_1.2.5_SSP.zip" - ] - }, - - "Beta 4 (Server)": { - "search": "Beta 4 (1.2.5)", - "links": [ - "admf u460vgtc44gyxcx/HardcoreEnd_beta4_1.2.5_SMP.zip", - "mf u460vgtc44gyxcx/HardcoreEnd_beta4_1.2.5_SMP.zip" - ] - }, - - "Beta 4 (VC Server)": { - "search": "Beta 4 (1.2.5)", - "links": [ - "admf pckolou4ool89yd/HardcoreEnd_beta4_1.2.5_SMP_C.zip", - "mf pckolou4ool89yd/HardcoreEnd_beta4_1.2.5_SMP_C.zip" - ] - }, - - "Beta 3 (Client)": { - "search": "Beta 3 (1.2.5)", - "links": [ - "admf 83zm8m3qvb3qipv/HardcoreEnd_beta3_1.2.5_SSP.zip", - "mf 83zm8m3qvb3qipv/HardcoreEnd_beta3_1.2.5_SSP.zip" - ] - }, - - "Beta 3 (Server)": { - "search": "Beta 3 (1.2.5)", - "links": [ - "admf wbms2220sescusf/HardcoreEnd_beta3_1.2.5_SMP.zip", - "mf wbms2220sescusf/HardcoreEnd_beta3_1.2.5_SMP.zip" - ] - }, - - "Beta 3 (VC Server)": { - "search": "Beta 3 (1.2.5)", - "links": [ - "admf tw6c7qziz0849j1/HardcoreEnd_beta3_1.2.5_SMP_C.zip", - "mf tw6c7qziz0849j1/HardcoreEnd_beta3_1.2.5_SMP_C.zip" - ] - }, - - "Beta 2 (Client)": { - "search": "Beta 2 (1.2.5)", - "links": [ - "admf xb5hbs3u7vao8hp/HardcoreEnd_beta2_1.2.5_SSP.zip", - "mf xb5hbs3u7vao8hp/HardcoreEnd_beta2_1.2.5_SSP.zip" - ] - } - }, - - "1.2.4": { - "Beta 1 (Client)": { - "search": "Beta 1 (1.2.4)", - "links": [ - "admf x0hc3z3qyt5ppu2/HardcoreEnd_beta1_1.2.4_SSP.zip", - "mf x0hc3z3qyt5ppu2/HardcoreEnd_beta1_1.2.4_SSP.zip" - ] - } - }, - - "1.2.3": { - "Beta 1 (Client + Server)": { - "search": "First version (1.2.3)", - "links": [ - "admf a8rijy8bj39capa/HardcoreEnd.rar", - "mf a8rijy8bj39capa/HardcoreEnd.rar" - ] - } - } - } -} diff --git a/UpdateNotificationData.txt b/UpdateNotificationData.txt deleted file mode 100644 index 66e9e642..00000000 --- a/UpdateNotificationData.txt +++ /dev/null @@ -1,169 +0,0 @@ -{ - "28 - 1.8": { - "modVersion": "1.8", - "mcVersions": [ "1.7.10" ], - "releaseDate": "2 Apr 2015" - }, - - "27 - 1.7.1": { - "modVersion": "1.7.1", - "mcVersions": [ "1.7.10" ], - "releaseDate": "22 Feb 2015" - }, - - "26 - 1.7": { - "modVersion": "1.7", - "mcVersions": [ "1.7.10" ], - "releaseDate": "18 Jan 2015" - }, - - "25 - 1.6.7": { - "modVersion": "1.6.7", - "mcVersions": [ "1.7.10" ], - "releaseDate": "18 Dec 2014" - }, - - "24 - 1.6.6": { - "modVersion": "1.6.6", - "mcVersions": [ "1.7.10" ], - "releaseDate": "3 Dec 2014" - }, - - "23 - 1.6.5": { - "modVersion": "1.6.5", - "mcVersions": [ "1.7.10" ], - "releaseDate": "13 Nov 2014" - }, - - "22 - 1.6.4": { - "modVersion": "1.6.4", - "mcVersions": [ "1.7.10" ], - "releaseDate": "12 Oct 2014" - }, - - "21 - 1.6.3": { - "modVersion": "1.6.3", - "mcVersions": [ "1.7.10" ], - "releaseDate": "22 Sep 2014" - }, - - "20 - 1.6.2": { - "modVersion": "1.6.2", - "mcVersions": [ "1.7.10" ], - "releaseDate": "10 Aug 2014" - }, - - "19 - 1.6.2-PRERELEASE": { - "modVersion": "1.6.2-PRERELEASE", - "mcVersions": [ "1.7.10" ], - "releaseDate": "31 Jul 2014" - }, - - "18 - 1.6.1": { - "modVersion": "1.6.1", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "1 Jun 2014" - }, - - "17 - 1.6": { - "modVersion": "1.6", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "15 May 2014" - }, - - "16 - 1.5a": { - "modVersion": "1.5a", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "21 Apr 2014" - }, - - "15 - 1.5": { - "modVersion": "1.5", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "15 Apr 2014" - }, - - "14 - 1.5-BETA": { - "modVersion": "1.5-BETA", - "mcVersions": [ "1.7.2" ], - "releaseDate": "18 Mar 2014" - }, - - "13 - 1.4.3": { - "modVersion": "1.4.3", - "mcVersions": [ "1.6.4" ], - "releaseDate": "9 Mar 2014" - }, - - "12 - 1.4.2": { - "modVersion": "1.4.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "2 Mar 2014" - }, - - "11 - 1.4.1": { - "modVersion": "1.4.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "20 Feb 2014" - }, - - "10 - 1.4": { - "modVersion": "1.4", - "mcVersions": [ "1.6.4" ], - "releaseDate": "18 Feb 2014" - }, - - "9 - 1.3.3": { - "modVersion": "1.3.3", - "mcVersions": [ "1.6.4" ], - "releaseDate": "27 Jan 2014" - }, - - "8 - 1.3.2": { - "modVersion": "1.3.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "19 Jan 2014" - }, - - "7 - 1.3.1": { - "modVersion": "1.3.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "12 Jan 2014" - }, - - "6 - 1.3": { - "modVersion": "1.3", - "mcVersions": [ "1.6.4" ], - "releaseDate": "30 Dec 2013" - }, - - "5 - 1.2.2": { - "modVersion": "1.2.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "19 Dec 2013" - }, - - "4 - 1.2.1": { - "modVersion": "1.2.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "5 Dec 2013" - }, - - "3 - Pre-release 1.2": { - "modVersion": "1.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "28 Nov 2013" - }, - - "2 - 1.1.2": { - "modVersion": "1.1.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "1 Nov 2013" - }, - - "1 - 1.1.1": { - "modVersion": "1.1.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "29 Oct 2013" - } -} \ No newline at end of file diff --git a/UpdateNotificationDataV2.txt b/UpdateNotificationDataV2.txt deleted file mode 100644 index 9c2b5027..00000000 --- a/UpdateNotificationDataV2.txt +++ /dev/null @@ -1,192 +0,0 @@ -{ - "~URL": "http://hee.chylex.com/download", - - "30 - 1.8.2": { - "modVersion": "1.8.2", - "mcVersions": [ "1.7.10" ], - "buildId": 2696150, - "releaseDate": "26 Jun 2015" - }, - - "29 - 1.8.1": { - "modVersion": "1.8.1", - "mcVersions": [ "1.7.10" ], - "buildId": 3095150, - "releaseDate": "30 May 2015" - }, - - "28 - 1.8": { - "modVersion": "1.8", - "mcVersions": [ "1.7.10" ], - "buildId": 9294150, - "releaseDate": "2 Apr 2015" - }, - - "27 - 1.7.1": { - "modVersion": "1.7.1", - "mcVersions": [ "1.7.10" ], - "buildId": 2292150, - "releaseDate": "22 Feb 2015" - }, - - "26 - 1.7": { - "modVersion": "1.7", - "mcVersions": [ "1.7.10" ], - "buildId": 1891150, - "releaseDate": "18 Jan 2015" - }, - - "25 - 1.6.7": { - "modVersion": "1.6.7", - "mcVersions": [ "1.7.10" ], - "buildId": 1912140, - "releaseDate": "18 Dec 2014" - }, - - "24 - 1.6.6": { - "modVersion": "1.6.6", - "mcVersions": [ "1.7.10" ], - "buildId": 9312140, - "releaseDate": "3 Dec 2014" - }, - - "23 - 1.6.5": { - "modVersion": "1.6.5", - "mcVersions": [ "1.7.10" ], - "buildId": 1311140, - "releaseDate": "13 Nov 2014" - }, - - "22 - 1.6.4": { - "modVersion": "1.6.4", - "mcVersions": [ "1.7.10" ], - "buildId": 1210140, - "releaseDate": "12 Oct 2014" - }, - - "21 - 1.6.3": { - "modVersion": "1.6.3", - "mcVersions": [ "1.7.10" ], - "releaseDate": "22 Sep 2014" - }, - - "20 - 1.6.2": { - "modVersion": "1.6.2", - "mcVersions": [ "1.7.10" ], - "releaseDate": "10 Aug 2014" - }, - - "19 - 1.6.2-PRERELEASE": { - "modVersion": "1.6.2-PRERELEASE", - "mcVersions": [ "1.7.10" ], - "releaseDate": "31 Jul 2014" - }, - - "18 - 1.6.1": { - "modVersion": "1.6.1", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "1 Jun 2014" - }, - - "17 - 1.6": { - "modVersion": "1.6", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "15 May 2014" - }, - - "16 - 1.5a": { - "modVersion": "1.5a", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "21 Apr 2014" - }, - - "15 - 1.5": { - "modVersion": "1.5", - "mcVersions": [ "1.6.4", "1.7.2" ], - "releaseDate": "15 Apr 2014" - }, - - "14 - 1.5-BETA": { - "modVersion": "1.5-BETA", - "mcVersions": [ "1.7.2" ], - "releaseDate": "18 Mar 2014" - }, - - "13 - 1.4.3": { - "modVersion": "1.4.3", - "mcVersions": [ "1.6.4" ], - "releaseDate": "9 Mar 2014" - }, - - "12 - 1.4.2": { - "modVersion": "1.4.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "2 Mar 2014" - }, - - "11 - 1.4.1": { - "modVersion": "1.4.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "20 Feb 2014" - }, - - "10 - 1.4": { - "modVersion": "1.4", - "mcVersions": [ "1.6.4" ], - "releaseDate": "18 Feb 2014" - }, - - "9 - 1.3.3": { - "modVersion": "1.3.3", - "mcVersions": [ "1.6.4" ], - "releaseDate": "27 Jan 2014" - }, - - "8 - 1.3.2": { - "modVersion": "1.3.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "19 Jan 2014" - }, - - "7 - 1.3.1": { - "modVersion": "1.3.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "12 Jan 2014" - }, - - "6 - 1.3": { - "modVersion": "1.3", - "mcVersions": [ "1.6.4" ], - "releaseDate": "30 Dec 2013" - }, - - "5 - 1.2.2": { - "modVersion": "1.2.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "19 Dec 2013" - }, - - "4 - 1.2.1": { - "modVersion": "1.2.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "5 Dec 2013" - }, - - "3 - Pre-release 1.2": { - "modVersion": "1.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "28 Nov 2013" - }, - - "2 - 1.1.2": { - "modVersion": "1.1.2", - "mcVersions": [ "1.6.4" ], - "releaseDate": "1 Nov 2013" - }, - - "1 - 1.1.1": { - "modVersion": "1.1.1", - "mcVersions": [ "1.6.4" ], - "releaseDate": "29 Oct 2013" - } -} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 99454169..a380f6c7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,78 +1,517 @@ -import groovy.json.JsonSlurper +//version: ffe7b130f98fdfa1ac7c6ba4bd34722a55ab28d4 +/* +DO NOT CHANGE THIS FILE! + +Also, you may replace this file at any time if there is an update available. +Please check https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle for updates. + */ + + +import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + +import java.util.concurrent.TimeUnit buildscript { repositories { - mavenCentral() maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" - } - maven { - name = "jitpack" - url = "https://jitpack.io" + name = "forge" + url = "https://maven.minecraftforge.net" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { + name = "Scala CI dependencies" + url = "https://repo1.maven.org/maven2/" + } + maven { + name = "jitpack" + url = "https://jitpack.io" + } } - dependencies { - //Defaults to Java 8 & UTF-8 encoding - classpath ("com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT") + classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.4' } } +plugins { + id 'idea' + id 'scala' + id("org.ajoberstar.grgit") version("3.1.1") + id("com.github.johnrengelman.shadow") version("4.0.4") + id("com.palantir.git-version") version("0.12.3") +} apply plugin: 'forge' -version = "" -group = "chylex.hee.HardcoreEnderExpansion" +def projectJavaVersion = JavaLanguageVersion.of(8) -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +java { + toolchain { + languageVersion.set(projectJavaVersion) + } +} + +idea { + module { + inheritOutputDirs = true + downloadJavadoc = true + downloadSources = true + } +} + +if(JavaVersion.current() != JavaVersion.VERSION_1_8) { + throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current()) +} + +checkPropertyExists("modName") +checkPropertyExists("modId") +checkPropertyExists("modGroup") +checkPropertyExists("autoUpdateBuildScript") +checkPropertyExists("minecraftVersion") +checkPropertyExists("forgeVersion") +checkPropertyExists("replaceGradleTokenInFile") +checkPropertyExists("gradleTokenModId") +checkPropertyExists("gradleTokenModName") +checkPropertyExists("gradleTokenVersion") +checkPropertyExists("gradleTokenGroupName") +checkPropertyExists("apiPackage") +checkPropertyExists("accessTransformersFile") +checkPropertyExists("usesMixins") +checkPropertyExists("mixinPlugin") +checkPropertyExists("mixinsPackage") +checkPropertyExists("coreModClass") +checkPropertyExists("containsMixinsAndOrCoreModOnly") +checkPropertyExists("usesShadowedDependencies") +checkPropertyExists("developmentEnvironmentUserName") + +def checkPropertyExists(String propertyName) { + if (project.hasProperty(propertyName) == false) { + throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/gradle.properties") + } +} + + +String javaSourceDir = "src/main/java/" +String scalaSourceDir = "src/main/scala/" + +String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") +String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") +if((new File(targetPackageJava).exists() || new File(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala) +} + +if(apiPackage) { + targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + if((new File(targetPackageJava).exists() || new File(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala) + } +} + +if(accessTransformersFile) { + String targetFile = "src/main/resources/META-INF/" + accessTransformersFile + if(new File(targetFile).exists() == false) { + throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + } +} + +if(usesMixins.toBoolean()) { + if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) { + throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!") + } + + targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") + targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") + if((new File(targetPackageJava).exists() || new File(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala) + } + + String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" + String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala" + String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" + if((new File(targetFileJava).exists() || new File(targetFileScala).exists() || new File(targetFileScalaJava).exists()) == false) { + throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava) + } +} + +if(coreModClass) { + String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" + String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala" + String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" + if((new File(targetFileJava).exists() || new File(targetFileScala).exists() || new File(targetFileScalaJava).exists()) == false) { + throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava) + } +} + +configurations.all { + resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) + + // Make sure GregTech build won't time out + System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String) + System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String) +} + +// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version +'git config core.fileMode false'.execute() +// Pulls version from git tag +try { + version = minecraftVersion + "-" + gitVersion() +} +catch (Exception e) { + throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag!"); +} +group = modGroup +archivesBaseName = modId minecraft { - version = "1.7.10-10.13.4.1614-1.7.10" + version = minecraftVersion + "-" + forgeVersion + "-" + minecraftVersion runDir = "run" + + if (replaceGradleTokenInFile) { + replaceIn replaceGradleTokenInFile + if(gradleTokenModId) { + replace gradleTokenModId, modId + } + if(gradleTokenModName) { + replace gradleTokenModName, modName + } + if(gradleTokenVersion) { + replace gradleTokenVersion, versionDetails().lastTag + } + if(gradleTokenGroupName) { + replace gradleTokenGroupName, modGroup + } + } +} + +if(file("addon.gradle").exists()) { + apply from: "addon.gradle" +} + +apply from: 'repositories.gradle' + +configurations { + implementation.extendsFrom(shadowImplementation) } repositories { - maven { - name = "chickenbones" - url = "http://chickenbones.net/maven/" + maven { + name = "Overmind forge repo mirror" + url = "https://gregtech.overminddl1.com/" + } + if(usesMixins.toBoolean()) { + maven { + name = "sponge" + url = "https://repo.spongepowered.org/repository/maven-public" + } + maven { + url = "https://jitpack.io" + } } } dependencies { - compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev" - compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev" - compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev" + if(usesMixins.toBoolean()) { + annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3") + annotationProcessor("com.google.guava:guava:24.1.1-jre") + annotationProcessor("com.google.code.gson:gson:2.8.6") + annotationProcessor("org.spongepowered:mixin:0.8-SNAPSHOT") + // using 0.8 to workaround a issue in 0.7 which fails mixin application + compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") { + // Mixin includes a lot of dependencies that are too up-to-date + exclude module: "launchwrapper" + exclude module: "guava" + exclude module: "gson" + exclude module: "commons-io" + exclude module: "log4j-core" + } + compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev") + } } -task createResourcePack(type: Zip){ - from "music" - archiveName "HEE Music v1.0.zip" - destinationDir = file("build/libs") +apply from: 'dependencies.gradle' + +def mixingConfigRefMap = "mixins." + modId + ".refmap.json" +def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap +def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg" + +task generateAssets { + if(usesMixins.toBoolean()) { + new File(projectDir.toString() + "/src/main/resources/", "mixins." + modId + ".json").text = """{ + "required": true, + "minVersion": "0.7.11", + "package": "${modGroup}.${mixinsPackage}", + "plugin": "${modGroup}.${mixinPlugin}", + "refmap": "${mixingConfigRefMap}", + "target": "@env(DEFAULT)", + "compatibilityLevel": "JAVA_8" } -String modid = "" -String modver = "" +""" + } +} -processResources{ - File info = new File(sourceSets.main.resources.srcDirs.iterator().next(), "mcmod.info") - def slurp = new JsonSlurper() - def data = slurp.parseText(info.getText())[0] - - modid = data.modid - modver = data.version +task relocateShadowJar(type: ConfigureShadowRelocation) { + target = tasks.shadowJar + prefix = modGroup + ".shadow" +} + +shadowJar { + manifest { + attributes(getManifestAttributes()) + } + + minimize() // This will only allow shading for actually used classes + configurations = [project.configurations.shadowImplementation] + dependsOn(relocateShadowJar) } jar { - archiveName = modid+" MC-"+project.minecraft.version+" v"+modver+".jar" - manifest { - //attributes 'FMLAT': 'hee_at.cfg' + attributes(getManifestAttributes()) + } + + if(usesShadowedDependencies.toBoolean()) { + dependsOn(shadowJar) + enabled = false } } -tasks.build.dependsOn createResourcePack + +reobf { + if(usesMixins.toBoolean()) { + addExtraSrgFile mixinSrg + } +} + +afterEvaluate { + if(usesMixins.toBoolean()) { + tasks.compileJava { + options.compilerArgs += [ + "-AreobfSrgFile=${tasks.reobf.srg}", + "-AoutSrgFile=${mixinSrg}", + "-AoutRefMapFile=${refMap}", + // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code + "-XDenableSunApiLintControl", + "-XDignore.symbol.file" + ] + } + } +} + +runClient { + def arguments = [] + + if(usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] + } + + if(developmentEnvironmentUserName) { + arguments += [ + "--username", + developmentEnvironmentUserName + ] + } + + args(arguments) +} + +runServer { + def arguments = [] + + if (usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] + } + + args(arguments) +} + +tasks.withType(JavaExec).configureEach { + javaLauncher.set( + javaToolchains.launcherFor { + languageVersion = projectJavaVersion + } + ) +} + +processResources + { + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand "minecraftVersion": project.minecraft.version, + "modVersion": versionDetails().lastTag, + "modId": modId, + "modName": modName + } + + if(usesMixins.toBoolean()) { + from refMap + } + + // copy everything else, thats not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } + } + +def getManifestAttributes() { + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false && (usesMixins.toBoolean() || coreModClass)) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] + } + + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] + } + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] + } + + if(usesMixins.toBoolean()) { + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : "mixins." + modId + ".json", + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] + } + return manifestAttributes +} + +task sourcesJar(type: Jar) { + from (sourceSets.main.allJava) + from (file("$projectDir/LICENSE")) + getArchiveClassifier().set('sources') +} + +task shadowDevJar(type: ShadowJar) { + from sourceSets.main.output + getArchiveClassifier().set("dev") + + manifest { + attributes(getManifestAttributes()) + } + + minimize() // This will only allow shading for actually used classes + configurations = [project.configurations.shadowImplementation] +} + +task relocateShadowDevJar(type: ConfigureShadowRelocation) { + target = tasks.shadowDevJar + prefix = modGroup + ".shadow" +} + +task circularResolverJar(type: Jar) { + dependsOn(relocateShadowDevJar) + dependsOn(shadowDevJar) + enabled = false +} + +task devJar(type: Jar) { + from sourceSets.main.output + getArchiveClassifier().set("dev") + + manifest { + attributes(getManifestAttributes()) + } + + if(usesShadowedDependencies.toBoolean()) { + dependsOn(circularResolverJar) + enabled = false + } +} + +task apiJar(type: Jar) { + from (sourceSets.main.allJava) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString() + '/**' + } + + from (sourceSets.main.output) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString() + '/**' + } + + from (sourceSets.main.resources.srcDirs) { + include("LICENSE") + } + + getArchiveClassifier().set('api') +} + +artifacts { + archives sourcesJar + archives devJar + if(apiPackage) { + archives apiJar + } +} + +// Updating +task updateBuildScript { + doLast { + if (updateBuildScript()) return + + print("Build script already up-to-date!") + } +} + +if (isNewBuildScriptVersionAvailable()) { + if (autoUpdateBuildScript.toBoolean()) { + updateBuildScript() + } else { + println("Build script update available! Run 'gradle updateBuildScript'") + } +} + +static URL availableBuildScriptUrl() { + new URL("https://raw.githubusercontent.com/SinTh0r4s/ExampleMod1.7.10/main/build.gradle") +} + +static boolean updateBuildScript() { + if (isNewBuildScriptVersionAvailable()) { + def buildscriptFile = new File("build.gradle") + availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } } + print("Build script updated. Please REIMPORT the project or RESTART your IDE!") + return true + } + return false +} + +static boolean isNewBuildScriptVersionAvailable() { + Map parameters = ["connectTimeout": 2000, "readTimeout": 2000] + + String currentBuildScript = new File("build.gradle").getText() + String currentBuildScriptHash = getVersionHash(currentBuildScript) + String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() + String availableBuildScriptHash = getVersionHash(availableBuildScript) + + boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash + return !isUpToDate +} + +static String getVersionHash(String buildScriptContent) { + String versionLine = buildScriptContent.find("^//version: [a-z0-9]*") + if(versionLine != null) { + return versionLine.split(": ").last() + } + return "" +} + +configure(updateBuildScript) { + group = 'forgegradle' + description = 'Updates the build script to the latest version' +} diff --git a/dependencies.gradle b/dependencies.gradle new file mode 100644 index 00000000..54565da5 --- /dev/null +++ b/dependencies.gradle @@ -0,0 +1,9 @@ +// Add your dependencies here + +dependencies { + compile("com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev") + + compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { + transitive = false + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..bff454b6 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,60 @@ +modName = Hardcore Ender Expansion + +# This is a case-sensitive string to identify your mod. Convention is to use lower case. +modId = HardcoreEnderExpansion + +modGroup = chylex.hee + +# WHY is there no version field? +# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the +# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ + +# Will update your build.gradle automatically whenever an update is available +autoUpdateBuildScript = false + +minecraftVersion = 1.7.10 +forgeVersion = 10.13.4.1614 + +# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you +# restart Minecraft in development. Choose this dependent on your mod: +# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name +# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty +developmentEnvironmentUserName = "Developer" + +# Define a source file of your project with: +# public static final String VERSION = "GRADLETOKEN_VERSION"; +# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's +# version in @Mod([...], version = VERSION, [...]) +# Leave these properties empty to skip individual token replacements +replaceGradleTokenInFile = HardcoreEnderExpansion.java +gradleTokenModId = +gradleTokenModName = +gradleTokenVersion = GRADLETOKEN_VERSION +gradleTokenGroupName = + +# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can +# leave this property empty. +# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api +apiPackage = + +# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/ +# Example value: mymodid_at.cfg +accessTransformersFile = + +# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! +usesMixins = false +# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. +mixinPlugin = +# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +mixinsPackage = +# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! +# This parameter is for legacy compatability only +# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin +coreModClass = +# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class +# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! +containsMixinsAndOrCoreModOnly = false + +# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your +# responsibility check the licence and request permission for distribution, if required. +usesShadowedDependencies = false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 99340b4a..5c2d1cf0 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2c2bbe5f..3ab0b725 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip diff --git a/gradlew b/gradlew index 91a7e269..83f2acfd 100644 --- a/gradlew +++ b/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# 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 +# +# https://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. +# ############################################################################## ## @@ -6,47 +22,6 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -61,9 +36,49 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -90,7 +105,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -110,10 +125,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +170,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 8a0b282a..9618d8d9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,14 +24,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +62,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +75,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000..09bbb514 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +before_install: + - ./gradlew setupCIWorkspace \ No newline at end of file diff --git a/repositories.gradle b/repositories.gradle new file mode 100644 index 00000000..7d02b583 --- /dev/null +++ b/repositories.gradle @@ -0,0 +1,7 @@ +// Add any additional repositiroes for your dependencies here + +repositories { + maven { + url = "https://jitpack.io" + } +} diff --git a/src/main/java/chylex/hee/HardcoreEnderExpansion.java b/src/main/java/chylex/hee/HardcoreEnderExpansion.java index d61efce6..d263010e 100644 --- a/src/main/java/chylex/hee/HardcoreEnderExpansion.java +++ b/src/main/java/chylex/hee/HardcoreEnderExpansion.java @@ -54,7 +54,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.network.NetworkRegistry; -@Mod(modid = "HardcoreEnderExpansion", name = "Hardcore Ender Expansion", version = "", useMetadata = true, guiFactory = "chylex.hee.gui.core.ModGuiFactory") +@Mod(modid = "HardcoreEnderExpansion", name = "Hardcore Ender Expansion", version = "GRADLETOKEN_VERSION", useMetadata = true, guiFactory = "chylex.hee.gui.core.ModGuiFactory") public class HardcoreEnderExpansion{ @Instance("HardcoreEnderExpansion") public static HardcoreEnderExpansion instance; diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 97832f50..7a4de057 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,10 +1,10 @@ [ { - "modid": "HardcoreEnderExpansion", - "name": "Hardcore Ender Expansion", - "version": "1.8.9-GTNH", - "mcversion": "", - "description": "Hardcore Ender Expansion offers unique, new content across the End. The dragon became a truly challenging boss with a great reward, but the adventure doesn't end there.\n\nThe End is no longer just an island. Go investigate unique ores, battle new mobs, travel to new biomes, the death awaits you!\n\n$nFind me on Twitter:$r https://twitter.com/chylexmc\n\n$nDownload music:$r https://hee-music.chylex.com", + "modid": "${modId}", + "name": "${modName}", + "version": "${modVersion}", + "mcversion": "${minecraftVersion}", + "description": "Hardcore Ender Expansion offers unique, new content across the End. The dragon became a truly challenging boss with a great reward, but the adventure doesn't end there.\n\nThe End is no longer just an island. Go investigate unique ores, battle new mobs, travel to new biomes, the death awaits you!\n\nFind me on Twitter: https://twitter.com/chylexmc\n\nDownload music: https://hee-music.chylex.com", "logoFile": "hee_logo.png", "url": "https://hee.chylex.com", "updateUrl": "",