Unable to apply external pre-compiled plugin

I was following article publishing convention plugin. this is project structure for plugin.

       -- build.gradle
       -- settings.gradle
       -- src/main/groovy
          -- com.platform.platform-plugin.gradle

build.gradle looks like this

plugins {
        id 'groovy-gradle-plugin'
        id 'java-gradle-plugin'
        id 'maven-publish'
    group = 'com.platform.plugins'
    version = '0.1.0-SNAPSHOT'
    publishing {
        repositories {

Next i ran ./gradlew build && .gradlew publishToMavenLocal to publish plugin to local artifactory. (verified plugin-platform-0.1.0-SNAPSHOT.jar/.pom/.module packages are available)

Now In another project, where i want to apply com.platform.platform-plugin, i have updated settings.gradle to include plugin-management block as below

pluginManagement {
        repositories {

and applied plugin in plugins block of build script.

    plugins {
        id 'com.platform.platform-plugin' version '0.1.0-SNAPSHOT'

Now, when i run ./gradlew build, I get following error

FAILURE: Build failed with an exception.
    * What went wrong:
    > org.gradle.plugin.devel.internal.precompiled.FirstPassPrecompiledScript
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Any help / pointer to resolve this would be helpful. Thank you.