Object AndroidPluginIntegration

  • All Implemented Interfaces:

    
    public class AndroidPluginIntegration
    
                        

    This helper class handles communication with the android plugin. It is isolated in a separate class to avoid adding dependency on the android plugin. Instead, we add a compileOnly dependency to the Android Plugin, which means we can still function without the Android plugin. The downside is that we need to ensure never to access Android plugin APIs directly without checking its existence (we have tests covering that case).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit forEachAndroidSourceSet(Project project, Function1<String, Unit> onSourceSet)
      final List<String> getCompilationSourceSets(KotlinJvmAndroidCompilation kotlinCompilation)
      final Unit syncSourceSets(Project project, KotlinJvmAndroidCompilation kotlinCompilation, TaskProvider<?> kspTaskProvider, File javaOutputDir, File kotlinOutputDir, File classOutputDir, FileCollection resourcesOutputDir)
      final Boolean useLegacyVariantApi(Project $self) Returns false for AGP versions 8.10.0-alpha03 or higher.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • syncSourceSets

         final Unit syncSourceSets(Project project, KotlinJvmAndroidCompilation kotlinCompilation, TaskProvider<?> kspTaskProvider, File javaOutputDir, File kotlinOutputDir, File classOutputDir, FileCollection resourcesOutputDir)
      • useLegacyVariantApi

         final Boolean useLegacyVariantApi(Project $self)

        Returns false for AGP versions 8.10.0-alpha03 or higher.

        Returns true for older AGP versions or when AGP version cannot be determined.