hierynomus / license-gradle-plugin

Manage your license(s)
http://www.javadude.nl
Other
409 stars 114 forks source link

Plugin with id 'com.github.hierynomus.license-base' not found #139

Closed arulrajnet closed 5 years ago

arulrajnet commented 7 years ago

I am using license-gradle-plugin 0.14.0. Gradle version 3.5. Java 1.8

My gradle license config

buildscript {
  repositories.maven { url 'https://plugins.gradle.org/m2/' }
  dependencies.classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
}

apply plugin: nl.javadude.gradle.plugins.license.LicensePlugin

license {
    include "**/*.java"
    header rootProject.file('gradle/license.template')
    strictCheck true
    skipExistingHeaders false
    ext {
      copyright_range = Calendar.getInstance().get(Calendar.YEAR)
      name = "Arulraj Venni"
    }
    mapping {
      java = 'DOUBLESLASH_STYLE'
    }
}

The error I got

* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [class 'nl.javadude.gradle.plugins.license.LicensePlugin']
   > Plugin with id 'com.github.hierynomus.license-base' not found.

Version 0.13.1 is working fine for the same above config.

arulrajnet commented 7 years ago

For your reference this is that demo repo . I have used license.gradle as external buildscript.

To reproduce that issue change that version to 0.14.0 in license.gradle.

hierynomus commented 7 years ago

Did you follow the README?

https://github.com/hierynomus/license-gradle-plugin/blob/master/README.adoc#source-file-license-application

Looking at your gradle files you're trying to apply the class file, instead of the plugin.

2017-06-12 19:36 GMT+02:00 Arul notifications@github.com:

For your reference this is that demo repo https://github.com/arulrajnet/gradle-java-template . I have used license.gradle https://github.com/arulrajnet/gradle-java-template/blob/master/gradle/license.gradle as external buildscript.

To reproduce that issue change that version to 0.14.0 in license.gradle.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hierynomus/license-gradle-plugin/issues/139#issuecomment-307861365, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLo7v6GDGJaFm3dCmVlhdR3jxnD5HQks5sDXctgaJpZM4N2NQD .

arulrajnet commented 7 years ago

I am using this as external build script. So giving plugin id will not work. That's why I have used class file. Refer http://mrhaki.blogspot.in/2015/10/gradle-goodness-apply-external-script.html

hierynomus commented 7 years ago

The "problem" in this case is that the LicensePlugin class tries to apply the base plugin because it needs that.

pgelinas commented 5 years ago

If the LicensePlugin applies the two plugins by its class name instead of the id, wouldn't that solve the issue of external script usage?

arulrajnet commented 5 years ago

@pgelinas yes its solves that issue. Gave PR #171 for the same. @hierynomus please review

hierynomus commented 5 years ago

Accepted, thanks!

Op do 10 jan. 2019 17:55 schreef Arul <notifications@github.com:

@pgelinas https://github.com/pgelinas yes its solves that issue. Gave PR for the same. @hierynomus https://github.com/hierynomus please review

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hierynomus/license-gradle-plugin/issues/139#issuecomment-453169852, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLoy9CYST3za5bGkRMIVQeYA2Ney2mks5vB3CJgaJpZM4N2NQD .

To-da commented 5 years ago

@hierynomus are you going to release this fix anytime soon (0.15.1) ? @arulrajnet or is there any workaround for external build script usage? Thank you.

arulrajnet commented 5 years ago

@To-da There is no workaround. Move to 0.13.1 version