gaelmarhic / Quadrant

A Gradle plugin for Android that makes navigation easy in multi-module projects.
Apache License 2.0
216 stars 13 forks source link

Plugin cannot be applied using plugins DSL #1

Closed Syex closed 4 years ago

Syex commented 4 years ago

Hi,

as described here I added your plugin to one of my Android modules, but it doesn't work. I reproduced this with a new, default Android project:

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id "com.gaelmarhic.quadrant" version "1.2"
}

Gradle sync fails with:

A problem occurred configuring project ':app'.
> Could not resolve all artifacts for configuration ':app:classpath'.
   > Could not find com.android.tools.build:gradle:3.5.0.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven 
     POM' format, you need to adjust the 'metadataSources { ... }' of the repository 
     Required by:
         project :app > com.gaelmarhic.quadrant:com.gaelmarhic.quadrant.gradle.plugin:1.2 > gradle.plugin.com.gaelmarhic:quadrant:1.2

Using the legacy method works, though.

Syex commented 4 years ago

Adding

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
    }
}

to settings.gradle fixes it. You may want to add it to the README or give me a sign and I'll PR it.

gaelmarhic commented 4 years ago

Hi @Syex!

First of all, thank you for your interest in Quadrant.

Also, thank you for investigating this issue and coming up with a solution!

I do not have much time in the following days. If you feel like PRing it, please go ahead :)

If not, I will add it to the README myself when I have some time.

Kind regards.

Gaël

gaelmarhic commented 4 years ago

Hi @Syex. PR merged! Thanks so much for your contribution!