diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7b6f571 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "Source/dependencies/Harvest-Post-Mortem-1.3"] + path = Source/dependencies/Harvest-Post-Mortem-1.3 + url = https://github.com/ViralReaction/Harvest-Post-Mortem-Sans-Hugslib.git +[submodule "Source/dependencies/Harvest-Post-Mortem-1.4"] + path = Source/dependencies/Harvest-Post-Mortem-1.4 + url = https://github.com/ViralReaction/Harvest-Post-Mortem-Sans-Hugslib.git +[submodule "Source/dependencies/rjw"] + path = Source/dependencies/rjw + url = https://gitgud.io/Ed86/rjw.git diff --git a/1.3/Assemblies/RJW_patch_Autopsy.dll b/1.3/Assemblies/RJW_patch_Autopsy.dll index 4d4b222..02f6281 100644 Binary files a/1.3/Assemblies/RJW_patch_Autopsy.dll and b/1.3/Assemblies/RJW_patch_Autopsy.dll differ diff --git a/1.4/Assemblies/RJW_patch_Autopsy.dll b/1.4/Assemblies/RJW_patch_Autopsy.dll index 3ec9704..e70d4ff 100644 Binary files a/1.4/Assemblies/RJW_patch_Autopsy.dll and b/1.4/Assemblies/RJW_patch_Autopsy.dll differ diff --git a/1.5/Assemblies/RJW_patch_Autopsy.dll b/1.5/Assemblies/RJW_patch_Autopsy.dll index 46df713..f6d4b58 100644 Binary files a/1.5/Assemblies/RJW_patch_Autopsy.dll and b/1.5/Assemblies/RJW_patch_Autopsy.dll differ diff --git a/1.5/Patches/NewMedicalRecipesUtilityPatch.cs b/1.5/Patches/NewMedicalRecipesUtilityPatch.cs new file mode 100644 index 0000000..3beb3cb --- /dev/null +++ b/1.5/Patches/NewMedicalRecipesUtilityPatch.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; +using rjw; +using Autopsy; +using HarmonyLib; + +namespace RJW_patch_Autopsy +{ + [HarmonyPatch(typeof(NewMedicalRecipesUtility), nameof(NewMedicalRecipesUtility.TraverseBody))] + public static class NewMedicalRecipesUtilityPatch + { + private const bool DEBUG = true; + + private static void log(String message) + { + if (DEBUG) + { + Log.Message($"[RJW_Autopsy] {message}"); + } + } + + [HarmonyPostfix] + public static IEnumerable Postfix(IEnumerable vanillaParts, RecipeInfo recipeInfo, Corpse corpse, + float skillChance) + { + log("Starting AddRjwParts"); + + /*//Collect vanilla parts + var core = corpse.InnerPawn.RaceProps.body.corePart; + var queue = new List {core}; + var hediffSet = corpse.InnerPawn.health.hediffSet; + var results = new List(); + var damagedParts = new List(); + while (queue.Count > 0) + { + var part = queue.First(); + queue.Remove(part); + //Drop parts and bionics that are higher on the body tree. + if (NewMedicalRecipesUtility.TryGetParts(corpse, recipeInfo, part, skillChance, ref results, + ref damagedParts) && core != part) + continue; + queue.AddRange(part.parts.Where(x => !hediffSet.PartIsMissing(x))); + } + + foreach (var part in damagedParts) + NewMedicalRecipesUtility.DamageHarvested(corpse.InnerPawn, part); + */ + // var results = __result.ToList(); + // log($"Collected {results.Count} vanilla parts"); + + //Collect rjw rediffs + var rjwNaturalDiffs = (from x in corpse.InnerPawn.health.hediffSet.hediffs + where x is Hediff_NaturalSexPart + select x).ToList(); + var rjwArtificialDiffs = (from x in corpse.InnerPawn.health.hediffSet.hediffs + where x is Hediff_ArtificialSexPart + select x).ToList(); + + log($"Collected {rjwNaturalDiffs.Count} natural and {rjwArtificialDiffs.Count} artificial hediffs"); + + //Collect parts from hediffs rjw's surgery methods + var rjwNaturalThings = rjwNaturalDiffs.Select(hediff => + { + var tmp = SexPartAdder.recipePartRemover(hediff); + log($"Obtained natural part: {tmp} from hediff: {hediff}"); + return tmp; + }).ToList(); + var rjwArtificialThings = rjwArtificialDiffs.Select(hediff => + { + var tmp = SexPartAdder.recipePartRemover(hediff); + log($"Obtained artificial part: {tmp} from hediff: {hediff}"); + return tmp; + }).ToList(); + + log( + $"Collected {rjwNaturalThings.Count} things from {rjwNaturalDiffs.Count} natural and {rjwArtificialThings.Count} things from {rjwArtificialDiffs.Count} artificial hediffs"); + + var results = new HashSet(); + //Simulate success chance scaled with skill etc. + rjwNaturalThings.ForEach(t => + { + if (DEBUG || Rand.Chance(Math.Min(skillChance, recipeInfo.NaturalChance))) results.Add(t); + }); + rjwArtificialThings.ForEach(t => + { + if (DEBUG || Rand.Chance(Math.Min(skillChance, recipeInfo.BionicChance))) results.Add(t); + }); + + //Remove all parts that were tried to harvest from the corpse + rjwNaturalDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d)); + rjwArtificialDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d)); + + if (results.Count > recipeInfo.PartNumber) + { + var random = new Random(); + results = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber).ToHashSet(); + } + + foreach (var result in results) + { + log(result.ToString()); + yield return result; + } + + foreach (var result in vanillaParts) + { + log(result.ToString()); + yield return result; + } + // return false; + } + } +} \ No newline at end of file diff --git a/About/Manifest.xml b/About/Manifest.xml index d6aca2c..ec3cd93 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -2,5 +2,5 @@ RJW patch - Harvest Organs Post Mortem - 5600.0.1.5 + 5603.0.1.5 diff --git a/Source/RJW_patch_Autopsy/1.5/Patches/NewMedicalRecipesUtilityPatch.cs b/Source/RJW_patch_Autopsy/1.5/Patches/NewMedicalRecipesUtilityPatch.cs index 9b665de..3beb3cb 100644 --- a/Source/RJW_patch_Autopsy/1.5/Patches/NewMedicalRecipesUtilityPatch.cs +++ b/Source/RJW_patch_Autopsy/1.5/Patches/NewMedicalRecipesUtilityPatch.cs @@ -11,20 +11,22 @@ namespace RJW_patch_Autopsy [HarmonyPatch(typeof(NewMedicalRecipesUtility), nameof(NewMedicalRecipesUtility.TraverseBody))] public static class NewMedicalRecipesUtilityPatch { - private const bool DEBUG = false; + private const bool DEBUG = true; private static void log(String message) { if (DEBUG) { - Log.Message(message); + Log.Message($"[RJW_Autopsy] {message}"); } } [HarmonyPostfix] - public static IEnumerable AddRjwParts(IEnumerable __result, RecipeInfo recipeInfo, Corpse corpse, + public static IEnumerable Postfix(IEnumerable vanillaParts, RecipeInfo recipeInfo, Corpse corpse, float skillChance) { + log("Starting AddRjwParts"); + /*//Collect vanilla parts var core = corpse.InnerPawn.RaceProps.body.corePart; var queue = new List {core}; @@ -45,8 +47,8 @@ namespace RJW_patch_Autopsy foreach (var part in damagedParts) NewMedicalRecipesUtility.DamageHarvested(corpse.InnerPawn, part); */ - var results = __result.ToList(); - log($"Collected {results.Count} vanilla parts"); + // var results = __result.ToList(); + // log($"Collected {results.Count} vanilla parts"); //Collect rjw rediffs var rjwNaturalDiffs = (from x in corpse.InnerPawn.health.hediffSet.hediffs @@ -62,19 +64,20 @@ namespace RJW_patch_Autopsy var rjwNaturalThings = rjwNaturalDiffs.Select(hediff => { var tmp = SexPartAdder.recipePartRemover(hediff); - Log.Message($"obtained ${tmp} from ${hediff} via rjw"); + log($"Obtained natural part: {tmp} from hediff: {hediff}"); return tmp; }).ToList(); var rjwArtificialThings = rjwArtificialDiffs.Select(hediff => { var tmp = SexPartAdder.recipePartRemover(hediff); - Log.Message($"obtained ${tmp} from ${hediff} via rjw"); + log($"Obtained artificial part: {tmp} from hediff: {hediff}"); return tmp; }).ToList(); log( $"Collected {rjwNaturalThings.Count} things from {rjwNaturalDiffs.Count} natural and {rjwArtificialThings.Count} things from {rjwArtificialDiffs.Count} artificial hediffs"); + var results = new HashSet(); //Simulate success chance scaled with skill etc. rjwNaturalThings.ForEach(t => { @@ -92,11 +95,18 @@ namespace RJW_patch_Autopsy if (results.Count > recipeInfo.PartNumber) { var random = new Random(); - results = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber).ToList(); + results = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber).ToHashSet(); } foreach (var result in results) { + log(result.ToString()); + yield return result; + } + + foreach (var result in vanillaParts) + { + log(result.ToString()); yield return result; } // return false; diff --git a/Source/RJW_patch_Autopsy/About/Manifest.xml b/Source/RJW_patch_Autopsy/About/Manifest.xml index d6aca2c..ec3cd93 100644 --- a/Source/RJW_patch_Autopsy/About/Manifest.xml +++ b/Source/RJW_patch_Autopsy/About/Manifest.xml @@ -2,5 +2,5 @@ RJW patch - Harvest Organs Post Mortem - 5600.0.1.5 + 5603.0.1.5 diff --git a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.3.csproj b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.3.csproj index 8cb4132..d53c6be 100644 --- a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.3.csproj +++ b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.3.csproj @@ -13,10 +13,10 @@ 11 - ©2024 Stardust3D + ©2025 Stardust3D Stardust3D - 5600.0.1.5 - 5600.0.1.5 + 5630.0.1.5 + 5630.0.1.5 true RJW_patch_Autopsy.snk This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts. @@ -24,22 +24,25 @@ bin\Release\1.3\ + + bin\Debug\1.3\ + - + - + - ..\..\..\RimwoldAutopsy\1.3\Assemblies\Autopsy.dll + ..\dependencies\Harvest-Post-Mortem-1.3\1.3\Assemblies\Autopsy.dll - ..\..\..\rjw-base\1.3\Assemblies\RJW.dll + ..\dependencies\rjw\1.3\Assemblies\RJW.dll diff --git a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.4.csproj b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.4.csproj index 7239113..fa8b511 100644 --- a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.4.csproj +++ b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.4.csproj @@ -13,10 +13,10 @@ 11 - ©2024 Stardust3D + ©2025 Stardust3D Stardust3D - 5600.0.1.5 - 5600.0.1.5 + 5630.0.1.5 + 5630.0.1.5 true RJW_patch_Autopsy.snk This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts. @@ -24,22 +24,25 @@ bin\Release\1.4\ + + bin\Debug\1.4\ + - + - + - ..\..\..\RimwoldAutopsy\1.4\Assemblies\Autopsy.dll + ..\dependencies\Harvest-Post-Mortem-1.4\1.4\Assemblies\Autopsy.dll - ..\..\..\rjw-base\1.4\Assemblies\RJW.dll + ..\dependencies\rjw\1.4\Assemblies\RJW.dll diff --git a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.5.csproj b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.5.csproj index 3e64ba6..c291901 100644 --- a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.5.csproj +++ b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy_1.5.csproj @@ -13,10 +13,10 @@ 11 - ©2024 Stardust3D + ©2025 Stardust3D Stardust3D - 5600.0.1.5 - 5600.0.1.5 + 5630.0.1.5 + 5630.0.1.5 true RJW_patch_Autopsy.snk This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts. @@ -24,15 +24,18 @@ bin\Release\1.5\ + + bin\Debug\1.5\ + - + - - + + diff --git a/Source/build.gradle.kts b/Source/build.gradle.kts index c678854..3429db6 100644 --- a/Source/build.gradle.kts +++ b/Source/build.gradle.kts @@ -11,7 +11,7 @@ plugins { alias(libs.plugins.versions) } -version = "5600.0.1.5" +version = "5630.0.1.5" val friendlyName = "rjw-patch-autopsy" tasks.register("buildC#_1.3") { @@ -26,6 +26,18 @@ tasks.register("buildC#_1.3") { // destinationDir = "build/msbuild/bin" } +tasks.register("buildC#_1.3_debug") { + // either a solution file + // solutionFile = "${rootProject.name}.sln" + // or a project file (.csproj or .vbproj) + projectFile = file("${rootProject.name}/${rootProject.name}_1.3.csproj") + + targets = listOf("Restore", "Clean", "Rebuild") + configuration = "Debug" + + // destinationDir = "build/msbuild/bin" +} + tasks.register("buildC#_1.4") { // either a solution file // solutionFile = "${rootProject.name}.sln" @@ -38,6 +50,18 @@ tasks.register("buildC#_1.4") { // destinationDir = "build/msbuild/bin" } +tasks.register("buildC#_1.4_debug") { + // either a solution file + // solutionFile = "${rootProject.name}.sln" + // or a project file (.csproj or .vbproj) + projectFile = file("${rootProject.name}/${rootProject.name}_1.4.csproj") + + targets = listOf("Restore", "Clean", "Rebuild") + configuration = "Debug" + + // destinationDir = "build/msbuild/bin" +} + tasks.register("buildC#_1.5") { // either a solution file // solutionFile = "${rootProject.name}.sln" @@ -50,10 +74,22 @@ tasks.register("buildC#_1.5") { // destinationDir = "build/msbuild/bin" } +tasks.register("buildC#_1.5_debug") { + // either a solution file + // solutionFile = "${rootProject.name}.sln" + // or a project file (.csproj or .vbproj) + projectFile = file("${rootProject.name}/${rootProject.name}_1.5.csproj") + + targets = listOf("Restore", "Clean", "Rebuild") + configuration = "Debug" + + // destinationDir = "build/msbuild/bin" +} + tasks.register("sign_1.3") { dependsOn("buildC#_1.3") workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net472") - executable = "H:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" args = listOf( "sign", "/seal", @@ -71,7 +107,7 @@ tasks.register("sign_1.3") { tasks.register("sign_1.4") { dependsOn("buildC#_1.4") workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net472") - executable = "H:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" args = listOf( "sign", "/seal", @@ -89,7 +125,7 @@ tasks.register("sign_1.4") { tasks.register("sign_1.5") { dependsOn("buildC#_1.5") workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.5/net48") - executable = "H:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" args = listOf( "sign", "/seal", @@ -108,6 +144,10 @@ tasks.register("copy") { dependsOn("copy_1.3", "copy_1.4", "copy_1.5", "copy_about") } +tasks.register("copy_debug") { + dependsOn("copy_1.3_debug", "copy_1.4_debug", "copy_1.5_debug", "copy_about") +} + tasks.register("copy_about") { from(project.projectDir.resolve("${rootProject.name}/About")) into(project.projectDir.parentFile.resolve("About")) @@ -119,36 +159,72 @@ tasks.register("copy_1.3") { into(project.projectDir.parentFile.resolve("1.3")) } +tasks.register("copy_1.3_debug") { + dependsOn("copyDll_1.3_debug") + from(project.projectDir.resolve("${rootProject.name}/1.3")) + into(project.projectDir.parentFile.resolve("1.3")) +} + tasks.register("copy_1.4") { dependsOn("copyDll_1.4") from(project.projectDir.resolve("${rootProject.name}/1.4")) into(project.projectDir.parentFile.resolve("1.4")) } +tasks.register("copy_1.4_debug") { + dependsOn("copyDll_1.4_debug") + from(project.projectDir.resolve("${rootProject.name}/1.4")) + into(project.projectDir.parentFile.resolve("1.4")) +} + tasks.register("copy_1.5") { dependsOn("copyDll_1.5") from(project.projectDir.resolve("${rootProject.name}/1.5")) into(project.projectDir.parentFile.resolve("1.5")) } +tasks.register("copy_1.5_debug") { + dependsOn("copyDll_1.5_debug") + from(project.projectDir.resolve("${rootProject.name}/1.5")) + into(project.projectDir.parentFile.resolve("1.5")) +} + tasks.register("copyDll_1.3") { dependsOn("sign_1.3") from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net472/${rootProject.name}.dll")) into(project.projectDir.parentFile.resolve("1.3/Assemblies")) } +tasks.register("copyDll_1.3_debug") { + dependsOn("buildC#_1.3_debug") + from(project.projectDir.resolve("${rootProject.name}/bin/Debug/1.3/net472/${rootProject.name}.dll")) + into(project.projectDir.parentFile.resolve("1.3/Assemblies")) +} + tasks.register("copyDll_1.4") { dependsOn("sign_1.4") from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net472/${rootProject.name}.dll")) into(project.projectDir.parentFile.resolve("1.4/Assemblies")) } +tasks.register("copyDll_1.4_debug") { + dependsOn("buildC#_1.4_debug") + from(project.projectDir.resolve("${rootProject.name}/bin/Debug/1.4/net472/${rootProject.name}.dll")) + into(project.projectDir.parentFile.resolve("1.4/Assemblies")) +} + tasks.register("copyDll_1.5") { dependsOn("sign_1.5") from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.5/net48/${rootProject.name}.dll")) into(project.projectDir.parentFile.resolve("1.5/Assemblies")) } +tasks.register("copyDll_1.5_debug") { + dependsOn("buildC#_1.5_debug") + from(project.projectDir.resolve("${rootProject.name}/bin/Debug/1.5/net48/${rootProject.name}.dll")) + into(project.projectDir.parentFile.resolve("1.5/Assemblies")) +} + tasks.register("buildZip") { dependsOn("clean", ":copy") into("$friendlyName/1.3") { @@ -174,7 +250,7 @@ tasks.register("buildZip") { } tasks.clean { - delete.add(project.projectDir.parentFile.resolve("1.3")) + // delete.add(project.projectDir.parentFile.resolve("1.3")) delete.add(project.projectDir.parentFile.resolve("1.4")) delete.add(project.projectDir.parentFile.resolve("1.5")) delete.add(project.projectDir.parentFile.resolve("About")) diff --git a/Source/dependencies/Harvest-Post-Mortem-1.3 b/Source/dependencies/Harvest-Post-Mortem-1.3 new file mode 160000 index 0000000..eabaf3d --- /dev/null +++ b/Source/dependencies/Harvest-Post-Mortem-1.3 @@ -0,0 +1 @@ +Subproject commit eabaf3d8fa247a49610c40557b136581322264fc diff --git a/Source/dependencies/Harvest-Post-Mortem-1.4 b/Source/dependencies/Harvest-Post-Mortem-1.4 new file mode 160000 index 0000000..bce9806 --- /dev/null +++ b/Source/dependencies/Harvest-Post-Mortem-1.4 @@ -0,0 +1 @@ +Subproject commit bce98068239f6882dabb8be3933c94b3295c08ea diff --git a/Source/dependencies/rjw b/Source/dependencies/rjw new file mode 160000 index 0000000..5c23d81 --- /dev/null +++ b/Source/dependencies/rjw @@ -0,0 +1 @@ +Subproject commit 5c23d8145e853ca6db6249be9d05583a13596444 diff --git a/Source/gradle/libs.versions.toml b/Source/gradle/libs.versions.toml index a650f84..3fe7d7e 100644 --- a/Source/gradle/libs.versions.toml +++ b/Source/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -versions = "0.51.0" +versions = "0.52.0" msbuild = "4.7" [libraries] diff --git a/Source/gradle/wrapper/gradle-wrapper.jar b/Source/gradle/wrapper/gradle-wrapper.jar index a4b76b9..1b33c55 100644 Binary files a/Source/gradle/wrapper/gradle-wrapper.jar and b/Source/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Source/gradle/wrapper/gradle-wrapper.properties b/Source/gradle/wrapper/gradle-wrapper.properties index 94113f2..ca025c8 100644 --- a/Source/gradle/wrapper/gradle-wrapper.properties +++ b/Source/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/Source/gradlew b/Source/gradlew index f5feea6..23d15a9 100644 --- a/Source/gradlew +++ b/Source/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/Source/gradlew.bat b/Source/gradlew.bat index 9d21a21..db3a6ac 100644 --- a/Source/gradlew.bat +++ b/Source/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell