Last active
July 8, 2022 15:34
-
-
Save blasten/78e97b1d97a736d7e8dcc3f520cea3f0 to your computer and use it in GitHub Desktop.
Add lifecycle dependency in build.gradle
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
afterEvaluate { | |
def containsEmbeddingDependencies = false | |
for (def configuration : configurations.all) { | |
for (def dependency : configuration.dependencies) { | |
if (dependency.group == 'io.flutter' && | |
dependency.name.startsWith('flutter_embedding') && | |
dependency.isTransitive()) | |
{ | |
containsEmbeddingDependencies = true | |
break | |
} | |
} | |
} | |
if (!containsEmbeddingDependencies) { | |
android { | |
dependencies { | |
// add lifecycle dependencies | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be: