From 6360333b3351fba9afb44ffb8c21ccc304b2a006 Mon Sep 17 00:00:00 2001 From: Joaquim Alvino de Mesquita Neto Date: Tue, 6 Feb 2024 16:34:17 +0100 Subject: [PATCH] Change cocoapods install command from gem install to bundle install (#21) changes cocoapods installation from gem() to tool() --- .../build/unity/ios/IOSBuildPluginIntegrationSpec.groovy | 4 +++- .../wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy | 8 ++++---- src/test/groovy/com/wooga/security/SecurityHelper.groovy | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/integrationTest/groovy/wooga/gradle/build/unity/ios/IOSBuildPluginIntegrationSpec.groovy b/src/integrationTest/groovy/wooga/gradle/build/unity/ios/IOSBuildPluginIntegrationSpec.groovy index 374b229..cd13802 100644 --- a/src/integrationTest/groovy/wooga/gradle/build/unity/ios/IOSBuildPluginIntegrationSpec.groovy +++ b/src/integrationTest/groovy/wooga/gradle/build/unity/ios/IOSBuildPluginIntegrationSpec.groovy @@ -787,7 +787,9 @@ class IOSBuildPluginIntegrationSpec extends IOSBuildIntegrationSpec { assertProcess(command, "repo-art") and: "'pod' version should be 1.14 or higher, and lesser than 2.x" - def versionStr = "${podsExec.absolutePath} --version".execute().with { + + def versionCmd = new ProcessBuilder([podsExec.absolutePath, "--version"]).directory(projectDir) + def versionStr = versionCmd.start().with { def (stdout, stderr) = [new StringBuilder(), new StringBuilder()] it.waitForProcessOutput(stdout, stderr) return stdout.toString() diff --git a/src/main/groovy/wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy b/src/main/groovy/wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy index a556205..63de781 100644 --- a/src/main/groovy/wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy +++ b/src/main/groovy/wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy @@ -409,12 +409,12 @@ class IOSBuildPlugin implements Plugin { def asdf = project.extensions.getByType(AsdfPluginExtension) asdf.version.convention(IOSBuildPluginConventions.asdfVersion.getStringValueProvider(project)) - asdf.tool("ruby") def ruby = project.extensions.getByType(RubyPluginExtension) - ruby.gem(new ToolVersionInfo("cocoapods", iosBuild.cocoapods.version)) - ruby.gem("cocoapods-art") - ruby.gem("cocoapods-pod-linkage") + ruby.tool(new ToolVersionInfo("cocoapods", iosBuild.cocoapods.version)) { + it.gem("cocoapods-art", []) + it.gem("cocoapods-pod-linkage", []) + } project.tasks.withType(PodInstallTask).configureEach { it.dependsOn(RubyPlugin.RUBY_BIN_STUBS_TASK) diff --git a/src/test/groovy/com/wooga/security/SecurityHelper.groovy b/src/test/groovy/com/wooga/security/SecurityHelper.groovy index 0c4858c..2996e85 100644 --- a/src/test/groovy/com/wooga/security/SecurityHelper.groovy +++ b/src/test/groovy/com/wooga/security/SecurityHelper.groovy @@ -250,7 +250,7 @@ class SecurityHelper { '-inkey', key.path, '-out', p12.path, '-name', options['privateKeyName'], - '-passout', "pass:${password}" + '-passout', "pass:${password}", '-legacy' ] def sout = new StringBuilder(), serr = new StringBuilder() def proc = args.execute()