-
-
Save hvisser/b027af96f9c57f94cf430bbdae236da9 to your computer and use it in GitHub Desktop.
Fix up kotlin plugin version + runtime for Flutter plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.3.0-rc01' | |
} | |
// Set a resolution strategy on the subprojects buildscript classpath | |
// Not sure if there's a more elegant way to do this | |
for (p in project.subprojects) { | |
p.buildscript.configurations.classpath.resolutionStrategy { | |
force 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11' | |
} | |
} | |
} | |
allprojects { | |
repositories { | |
google() | |
jcenter() | |
} | |
configurations.all { | |
resolutionStrategy { | |
dependencySubstitution { | |
// Replace the Kotlin old runtime with the new coordinates | |
// Depending on your project more tweaks to the resolution strategy may be needed | |
substitute module('org.jetbrains.kotlin:kotlin-stdlib-jre7') with module('org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.11') | |
} | |
} | |
} | |
} | |
rootProject.buildDir = '../build' | |
subprojects { | |
project.buildDir = "${rootProject.buildDir}/${project.name}" | |
} | |
subprojects { | |
project.evaluationDependsOn(':app') | |
} | |
task clean(type: Delete) { | |
delete rootProject.buildDir | |
} |
I cant get it to work. Im working with build gradle version 3.2.1. Maybe thats the problem?
map_view version is 0.0.14
Error: * What went wrong:
Execution failed for task ':app:preDebugBuild'.
Android dependency 'com.android.support:support-compat' has different version for the compile (27.0.2) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
Thanks!
Helped me a lot!
But will this affect running other plugins and apps?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you. This helps a lot.