143.1559.1: in gradle subprojects don't understand properties declared in parent

Hi All,

This is my build.gradle of the parent

allprojects {
    
group = "com.baml"

    
apply plugin: "java"               // need this plugin to declare source/target compatibility
    
sourceCompatibility = 1.8
    
targetCompatibility = 1.8

    
repositories {
        
mavenLocal()
        // For my own reason, there's no maven repository here :-) You need to download the libraries yourself.
    }

    
ext {
        
logbackVersion = "1.1.3"
        
slf4jVersion = "1.7.13"
        
jettyVersion = "9.3.1.v20150714"
        
httpComponentsVersion = "4.5.1"
        
snakeyamlVersion = "1.16"
    }

    
dependencies {
        
compile "org.slf4j:slf4j-api:$slf4jVersion"
        
compile "ch.qos.logback:logback-classic:$logbackVersion"
        
compile "ch.qos.logback:logback-access:$logbackVersion"
        
testCompile "junit:junit:4.12"
    }
}
 

This is for the sub project

version = "0.1-SNAPSHOT"

dependencies {
    
compile "org.apache.httpcomponents:httpclient:$httpComponentsVersion"
    
compile "org.yaml:snakeyaml:$snakeyamlVersion"
}
  

Idea said "Cannot resolve symbol 'httpComponentsVersion'" when I pointed the mouse to it.

0

Please sign in to leave a comment.