Identify buildSrc project(s)


(detelinyordanov) #1

Hi everyone,

I’m trying to configure different sets of repositories based on the project type, for build plugin projects I would like to configure separate repositories than those used for the standard product builds. A buildSrc project is similar to a build plugin project, but the question is how do I identify it? I’m now using the following:

boolean isBuildSrcProject = rootProject.projectDir.name == 'buildSrc' &&
     rootProject.projectDir == settings.settingsDir

Is this good enough or there is a better way?

Thanks,

Detelin


(Szczepan Faber) #2

Hey Detelin,

I don’t know a better way atm. The way you’ve done it is safe enough.

Cheers!