diff --git a/.gitignore b/.gitignore index 5741b6e..f807323 100755 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ gradle-app.setting # gradle/wrapper/gradle-wrapper.properties userHome/ out +bin +src/test/resources/SpockConfig.groovy diff --git a/build.gradle b/build.gradle index e5e4c09..aadebda 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,8 @@ dependencies { api 'net.wooga.gradle:fastlane:[2,3[' implementation "com.googlecode.plist:dd-plist:1.23" implementation 'com.wooga.gradle:gradle-commons:[1,2[' - implementation 'net.wooga.gradle:asdf:[1,2[' + //implementation 'net.wooga.gradle:asdf:[1,2[' + implementation 'net.wooga.gradle:asdf:1.1.0-rc.2' integrationTestImplementation'com.wooga.spock.extensions:spock-macos-keychain-extension:[1,2[' testImplementation 'com.wooga.gradle:gradle-commons-test:[1,2[' 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 f7f29ed..18bf998 100644 --- a/src/integrationTest/groovy/wooga/gradle/build/unity/ios/IOSBuildPluginIntegrationSpec.groovy +++ b/src/integrationTest/groovy/wooga/gradle/build/unity/ios/IOSBuildPluginIntegrationSpec.groovy @@ -17,11 +17,10 @@ package wooga.gradle.build.unity.ios -import com.wooga.gradle.PlatformUtils + import com.wooga.gradle.test.ConventionSource import com.wooga.gradle.test.PropertyLocation import com.wooga.gradle.test.PropertyQueryTaskWriter -import com.wooga.gradle.test.queries.PropertyQuery import com.wooga.gradle.test.queries.TestValue import com.wooga.gradle.test.writers.PropertyGetterTaskWriter import com.wooga.gradle.test.writers.PropertySetterWriter @@ -29,8 +28,6 @@ import com.wooga.security.Domain import com.wooga.security.MacOsKeychainSearchList import nebula.test.functional.ExecutionResult import net.wooga.system.ProcessList -import org.gradle.process.ExecSpec -import spock.lang.IgnoreIf import spock.lang.Requires import spock.lang.Shared import spock.lang.Timeout @@ -776,12 +773,21 @@ class IOSBuildPluginIntegrationSpec extends IOSBuildIntegrationSpec { and: "'pod' executable should have 'repo-art' subcommand" def podsExec = Paths.get(projectDir.absolutePath, stubsDir, "pod").toFile() - def podResult = "$podsExec.absolutePath repo-art".execute() - podResult.waitFor() == 0 + def command = "$podsExec.absolutePath" + assertProcess(command, "repo-art") where: stubs = ["pod"] stubsDir = "bin" taskName = "podInstall" } + + //workingDir == projectDir is necessary for asdf to locate the correct .tool-versions file + void assertProcess(File workingDir = projectDir, String... command) { + def process = new ProcessBuilder(command).directory(workingDir).start() + def exitValue = process.waitFor() + + def errorString = process.err.text + assert exitValue == 0, "Failed executing process ${command}: ${errorString}" + } } 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 d950b75..95889f3 100644 --- a/src/main/groovy/wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy +++ b/src/main/groovy/wooga/gradle/build/unity/ios/IOSBuildPlugin.groovy @@ -411,12 +411,15 @@ class IOSBuildPlugin implements Plugin { asdf.tool("ruby") def ruby = project.extensions.getByType(RubyPluginExtension) + ruby.enableGemfileGeneration() + // TODO: Remove once cocoapods is patched past 1.13.0 + ruby.gem("activesupport", "7.0.8") ruby.gem("cocoapods") ruby.gem("cocoapods-art") ruby.gem("cocoapods-pod-linkage") - def asdfGemInstallTask = project.tasks.named(RubyPlugin.RUBY_GEMS_TAK) { - dependsOn(AsdfPlugin.BIN_STUBS_TASK_NAME) + def asdfGemInstallTask = project.tasks.named(RubyPlugin.RUBY_GEMFILE_TASK) { + dependsOn(RubyPlugin.BUNDLE_BIN_STUBS_TASK) } project.tasks.withType(PodInstallTask).configureEach { diff --git a/src/test/resources/SpockConfig.groovy b/src/test/resources/SpockConfig.groovy deleted file mode 100644 index 5a8eca2..0000000 --- a/src/test/resources/SpockConfig.groovy +++ /dev/null @@ -1,8 +0,0 @@ -//This file is generated by atlas-plugins, -//the [autogenerated] block will be replaced when gradle runs, -//the remainder of the file can be edited as you like, -//as long as the [autogenerated] and [/autogenerated] commentaries aren't removed. - -//[autogenerated] -unroll {defaultPattern '#featureName[#iterationIndex]'} -//[/autogenerated]