Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work for buildscript dependencies in script plugins #13

Open
winterDroid opened this issue Apr 27, 2018 · 2 comments
Open

Does not work for buildscript dependencies in script plugins #13

winterDroid opened this issue Apr 27, 2018 · 2 comments

Comments

@winterDroid
Copy link

Hey!

Great plugin. I recognized that dependencies defined in the buildscript of script plugins are not fetched. Example:

# plugin.gradle

buildscript {
    repositories { ... }
    dependencies {
        classpath "com.test:testdep:1.0.0"
    }
}

apply plugin: "testplugin"
# build.gradle
buildscript {
  repositories {
    maven {
      url 'https://plugins.gradle.org/m2/'
    }
  }
  dependencies {
    classpath 'gradle.plugin.io.pry.gradle.offline_dependencies:gradle-offline-dependencies-plugin:0.3'
  }
}

apply from: "plugin.gradle"
apply plugin: 'io.pry.gradle.offline_dependencies'

In that case the com.test:testdep:1.0.0" dependency won't be fetched. As a workaround I can add it to the build.gradle` dependencies.

@mandrachek
Copy link

Downloading of buildscript dependencies is addressed in the readme:
https://github.com/mdietrichstein/gradle-offline-dependencies-plugin#handling-buildscript-dependencies

@jaredchenkin
Copy link

I'm going to jump on this because it's somewhat related to an issue i'm seeing - lmk if you want me to open a separate one.

I'm also having a hard time getting plugins pulled into the offline repository even though I am following the instructions on handling buildscript dependencies. I have a custom plugin that i've written that I'm trying to get pulled in but it isn't loading. It looks like what's happening is that the offline-dependencies plugin isn't pulling the gradle plugin marker artifact from the local cache, just the actual plugin itself. When I try to build the project using only the offline repository, it doesn't find my plugin even though the plugin jar/pom are in the offline repository. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants