How to get subproject to consume root project artifactory/repository settings?

How do I get all subprojects to consume the root project Artifactory repository settings for resolution? In my root project I have Artifactory working just fine, but if I run a task in a subproject, it does not ‘know’ of or inherit those settings.

I would rather not copy-paste the settings across all the projects.

Root project:

plugins {
    id "com.jfrog.artifactory" version "3.0.1"
}
  allprojects {
    group = 'com.something.something'
}
  artifactory {
    contextUrl = "${artifactory_contextUrl}"
 //The base Artifactory URL if not overridden by the publisher/resolver
    publish {
        repository {
            repoKey = 'some-repo'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
                    }
    }
    resolve {
        repository {
            repoKey = 'another-repo'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
        }
    }
}
  task createWrapper(type: Wrapper){
 gradleVersion= '2.1'
}

Subproject:

apply plugin: 'java'
  dependencies {
  testCompile 'junit:junit:4.11'
  testCompile 'com.codeborne:selenide:2.14'
}

You will have to use an allprojects {} block together with the old plugin application syntax (because the new syntax is not compatible with allprojects blocks, see the explanation in the blue box at the bottom of http://plugins.gradle.org/plugin/com.jfrog.artifactory).

In the root build file:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1"
    }
}
  allprojects {
    apply plugin: "com.jfrog.artifactory"
      artifactory {
        ...your common artifactory config...
    }
}