I am trying to encapsulate an Android plugin in my own plugin, but when I try to apply the plugin assembly, it fails except:
A problem occurred evaluating root project 'myproj'. > Failed to apply plugin [id 'com.mycomp.build'] > Failed to apply plugin [id 'android-library'] > Plugin with id 'android-library' not found.
Here's how I use the Android plugin in my own plugin implementation:
// build.gradle apply plugin: 'groovy' version = '1.0' group = 'com.mycomp' dependencies { compile gradleApi() compile localGroovy() } // Build.groovy package com.mycomp import org.gradle.api.Plugin import org.gradle.api.Project class Build implements Plugin<Project> { void apply(Project project) { println 'Hello from com.mycomp.Build' project.beforeEvaluate { buildscript.configurations.classpath += 'com.android.tools.build:gradle:1.0.0-rc1' } project.configure(project) { buildscript.repositories.mavenCentral() apply plugin: 'android-library' } } }
For some reason, the classpath does not load correctly, what am I doing wrong?
source share