Skip to content

Commit

Permalink
Try with pinning active support (#18)
Browse files Browse the repository at this point in the history
Try with pinning active support, changes asdf cocoapods installation to use gemfiles

With help from Joaquim Neto
  • Loading branch information
Azurelol authored Oct 18, 2023
1 parent f52d933 commit d61e558
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ gradle-app.setting
# gradle/wrapper/gradle-wrapper.properties
userHome/
out
bin
src/test/resources/SpockConfig.groovy
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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['
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@

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
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
Expand Down Expand Up @@ -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}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,15 @@ class IOSBuildPlugin implements Plugin<Project> {
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 {
Expand Down
8 changes: 0 additions & 8 deletions src/test/resources/SpockConfig.groovy

This file was deleted.

0 comments on commit d61e558

Please sign in to comment.