Closed benmarsh closed 8 months ago
Hello @benmarsh ,
You'll need to import kotlin into your ionic app. This will likely need to be done in your top level build.gradle
file.
Finally came back to this upgrade - thanks for the above hint, that worked well. Interestingly it threw up a new problem, but it is different so I will raise a new issue for that.
Just for completeness and to help anyone looking at this in future, I added the following:
/android/app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
/android/build.gradle
buildscript {
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.8.20'
. . .
dependencies {
. . .
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Finally came back to this upgrade - thanks for the above hint, that worked well. Interestingly it threw up a new problem, but it is different so I will raise a new issue for that.
Just for completeness and to help anyone looking at this in future, I added the following:
/android/app/build.gradle
- directly below “apply plugin: 'com.android.application'” at top of file
apply plugin: 'com.android.application' apply plugin: 'kotlin-android'
/android/build.gradle
- add classpath to dependencies and optionally version at top of buildscript block
- 1.8.20 is used elsewhere in other Capacitor plugins
buildscript { ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.8.20' . . . dependencies { . . . classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }
Thanks @benmarsh this was helpful
Hi,
I'm getting the following error when adding the Braze Cordova SDK to a Capacitor project.
Steps to reproduce;
ionic start
npx cap sync
"braze-cordova-sdk": "github:braze-inc/braze-cordova-sdk#master"
npm install
and thennpx cap sync
again to pull in SDKThis is with Gradle 8.0.2 and braze-cordova-sdk 7.0.0