gradle-native icon indicating copy to clipboard operation
gradle-native copied to clipboard

Nokee management plugin should allow settings plugin to resolve correctly

Open lacasseio opened this issue 2 years ago • 0 comments

Gradle process for resolving settings plugins follow something like this:

  • Configure pluginManagement block
  • Read all of plugins block
  • For each plugin id in plugins block, try to realize them from whatever is in the pluginManagement block
  • Then, apply each plugin id

With this process, we cannot do something like this:

plugins {
  id 'dev.nokee.nokee-version-management' version 'latest.release'
  id 'dev.nokee.xcode-build-adapter'
}

The build will fail because it cannot find dev.nokee.xcode-build-adapter plugin.

To work around this, we could configure the classpath to pull all of Nokee. Then, the settings plugin will be applied using the legacy apply:

plugins {
  id 'dev.nokee.nokee-version-management' version 'latest.release'
}
apply plugin:  'dev.nokee.xcode-build-adapter'

We don't like it, but we need something simple for the users, and this is the simplest. The advantage of this approach is allowing users to apply Nokee plugins using legacy apply in allproject/subproject` actions:

gradle.rootProject {
    apply plugin: 'dev.nokee.jni-library'
}

lacasseio avatar Aug 09 '22 20:08 lacasseio