grails-core
grails-core copied to clipboard
Newly generated project should run tests with Apple M1 processors without exception
Expected Behavior
The project created by the "grails create-app" command should not cause the error "Execution failed for task ':configureChromeDriverBinary'." when running tests (gradle check) under Apple M1. .
Actual Behaviour
When trying to run tests with gradle check
the following message appears
Execution failed for task ':configureChromeDriverBinary'.
> com.github.erdi.gradle.webdriver.repository.UnsupportedArchitectureException: UNKNOWN
Steps To Reproduce
- Create Grails App wit Web profile
- Start App (no problem)
- Start
./gradlew check
-> FAILURE: Build failed with an exception. -> com.github.erdi.gradle.webdriver.repository.UnsupportedArchitectureException
Environment Information
- macOS 12.3.1 (21E258)
- Apple M1 Pro
- Azul Zulu version 11.0.13
Example Application
No response
Version
5.1.7
@kurb70 you should use WebDriver binaries Gradle plugin v2.7, this version support macOS ARM64 architecture. But the default drivers repository-3.0.json file is no longer maintained, you can add the drivers which support Apple M1 by yourself.
Please reference here: https://github.com/rainboyan/grails-geb-test-driver-demo
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
// (1)
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.7"
}
}
...
webdriverBinaries {
driverUrlsConfiguration = resources.text.fromFile('repository-3.0.json') // (2)
if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
chromedriver {
version = '101.0.4951.41'
//architecture = 'ARM64'
fallbackTo32Bit = true
}
geckodriver {
version = '0.31.0'
}
}
}
Put the repository-3.0.json
in your app root,
{
"drivers": [
{
"name": "chromedriver",
"platform": "mac",
"bit": "arm64",
"version": "101.0.4951.41",
"url": "https://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_mac64_m1.zip"
},
{
"name": "geckodriver",
"platform": "mac",
"bit": "arm64",
"version": "0.31.0",
"url": "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-macos-aarch64.tar.gz"
},
]
}