Hello, I got a particular situation, just as I lik...
# gradle
d
Hello, I got a particular situation, just as I like 🙂 We got a projects structure like
Copy code
root
  ( modules )
  + gradle
    ( plugins )
    + publish
      - libraries ( plugin )
      - plugins ( plugin )
The goal is to have
Copy code
// root
plugins {
  id("publish-libraries")
}

// gradle
plugins {
  id("publish-plugins")
}
The problem is that if I apply
publish-plugins
to
gradle
project or one of its module , root does not find the plugins in
gradle
😕
Copy code
org.gradle.internal.exceptions.LocationAwareException: Build file '/Users/davide/Dev/Android/Workspace/xxx/build.gradle.kts' line: 28
Plugin [id: 'my-plugin'] was not found in any of the following sources:
( The 
gradle
 project builds correctly though )
g
If I understood your problem correctly, you should add this gradle modile with plugins to build script classpath, it's not auto-discoverable
But also you can just use buildSrc instead, it will be connected automatically
d
Well, actually I'm trying to replace buildSrc with composite builds, but that's another thing 🙂 I have
Copy code
// a
includeBuild("b") 
includeBuild("c")

// b
includeBuild("c")
Everything is fine if
a
applies
b
as pluging OR
b
applies
c
as pluging, but not both at the same time. Basically what I'm trying now and I think it will fix it is to publish
c
on Gradle Portal, but that's ugly, specially considering that
c
should be for internal purposes only
g
what is the point replace buildSrc? I mean I understand, you can have multiple composite builds, but until tooling doesn’t support it properly I would change it
anyway, hard to say something without some sample where it reproducible
d
I have a library for some Gradle utils that also includes serialization, having it in the classpath through buildSrc caused problem every time had to update serialization because of the breaking changes. Now I converted my lib to plugin and I solved the problem, but this project still using buildSrc with my lib and so we're blocked to update to Kotlin 1.4
I'll try to create a minimal project that reproduce it later