KamilH
09/28/2020, 12:27 PMcocoapods
plugin to my very simple library project and it fails at:
Execution failed for task ':podspec'.
> The Gradle wrapper is required to run the build from Xcode.
Please run the same command with `-Pkotlin.native.cocoapods.generate.wrapper=true` or run the `:wrapper` task to generate the wrapper manually.
As suggested I tried to run gradle wrapper
and it fails:
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.multiplatform', version: '1.4.10']
> Failed to apply plugin [id 'org.jetbrains.kotlin.multiplatform']
> The current Gradle version 5.4.1 is not compatible with the Kotlin Multiplatform plugin. Please use Gradle 6.0 or newer, or the previous version of the Kotlin plugin.
Why is that happening? In my gradle-wrapper.properties
I’m using distributionUrl=https\:<//services.gradle.org/distributions/gradle-6.6.1-bin.zip>
william
09/28/2020, 12:56 PMwilliam
09/28/2020, 12:56 PM./gradlew --gradle-version 6.6.1
or whatever the upgrade command isKamilH
09/28/2020, 12:59 PMfind in path
5.4.1 there is no resultsKamilH
09/28/2020, 1:00 PMgradle --version
and it indeed shows 5.4.1
KamilH
09/28/2020, 1:01 PMgradle
KamilH
09/28/2020, 1:09 PMgradle wrapper --gradle-version 6.6.1
FAILURE: Build failed with an exception.
* Where:
Build file 'PROJECT_PATH' line: 2
* What went wrong:
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.multiplatform', version: '1.4.10']
> Failed to apply plugin [id 'org.jetbrains.kotlin.multiplatform']
> The current Gradle version 5.4.1 is not compatible with the Kotlin Multiplatform plugin. Please use Gradle 6.0 or newer, or the previous version of the Kotlin plugin.
KamilH
09/28/2020, 1:19 PMgradle
via `brew`:
brew upgrade gradle
then running
gradle wrapper
to install wrapper in the project directory and finally synchronizing projectwilliam
09/28/2020, 10:14 PMKamilH
09/29/2020, 5:18 AMgradle
couldn’t install it in the project because it was on too low version. After manually upgrading system-wise gradle to 6.1.1 it installed gradle wraper in the project properly