/**
 *  This file gets included from the top-level build file of the android application and injects the appdynamics
 *  android gradle plugin into the build of that application.
 */
allprojects {
    subprojects { project ->
        project.buildscript {
            repositories {
                addAll rootProject.buildscript.repositories
            }
            dependencies {
                classpath 'com.appdynamics:appdynamics-gradle-plugin:25.9.0'
            }
        }
        project.plugins.withId('com.android.application') {
            // This gets executed when the android application plugin is applied
            project.plugins.apply("adeum")
            adeum {
                // This tells the gradle plugin not to inject the runtime library dependency into the user's application.
                // The runtime library is already included in the react-native-agent project, and it is made visible to
                // the application in case one wants to perform manual Instrumentation calls from the native context.
                dependencyInjection {
                    enabled = false
                }
            }
        }
    }
}
