Using multiple versions of org.springframework.boot:spring-boot-gradle-plugin in a gradle multi project

Is it possible to use multiple versions of a plugin in a multi project gradle build?

We are cutting over from spring boot older to sprint boot newer and have a project comprised of subprojects containing common code and sprint microservices.

I’d like to use the older version of the plugin for all project except the one I’m switching over. Therefore, I thought I could do this but I’m not sure if this is the standard gradle pattern.

Please let me know if you see problems with this approach.

Thanks

Root build.gradle

buildscript {
    ext {
        oldSpringBootVersion = '1.5.14.RELEASE'
        newSpringBootVersion = '2.1.6.RELEASE'
    }

    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${oldSpringBootVersion}"
    }


    configure(oldSpringBootProjects) {
    	apply plugin: 'org.springframework.boot'
    }
    configure(newSprintBootProjects) {
    	// do not apply the sprintboot plugin at root, let the subproject do it
    }

upgraded subproject

buildscript {
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${newSpringBootVersion}"
    }