File tree Expand file tree Collapse file tree
flutter_news_example/android Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,24 @@ subprojects {
1919 project.evaluationDependsOn(" :app" )
2020}
2121
22+ // Temporary workaround for third-party Android modules that still do not set
23+ // an explicit namespace. Remove once upstream dependencies are updated.
24+ // https://github.com/0maru/twitter_login/issues/140
25+ subprojects {
26+ pluginManager.withPlugin(" com.android.library" ) {
27+ val androidExtension = extensions.findByName(" android" ) ? : return @withPlugin
28+ val androidClass = androidExtension.javaClass
29+ val getNamespace = runCatching { androidClass.getMethod(" getNamespace" ) }.getOrNull() ? : return @withPlugin
30+ val setNamespace =
31+ runCatching { androidClass.getMethod(" setNamespace" , String ::class .java) }.getOrNull() ? : return @withPlugin
32+
33+ val namespace = getNamespace.invoke(androidExtension) as ? String
34+ if (namespace.isNullOrBlank()) {
35+ setNamespace.invoke(androidExtension, project.group.toString())
36+ }
37+ }
38+ }
39+
2240tasks.register<Delete >(" clean" ) {
2341 delete(rootProject.layout.buildDirectory)
2442}
You can’t perform that action at this time.
0 commit comments