Android Studio new module template - difference between topOut and projectOut global ids

While viewing Android Studio templates to create a new module, I met topOut and projectOut global identifiers in globals.xml.ftl . Both have the same meaning, that is, ".". The following is the contents of the file:

 <?xml version="1.0"?> <globals> <global id="topOut" value="." /> <global id="projectOut" value="." /> <global id="manifestOut" value="${manifestDir}" /> <global id="srcOut" value="${srcDir}/${slashedPackageName(packageName)}" /> <global id="nativeSrcOut" value="${escapeXmlAttribute(projectOut)}/src/main/cpp" /> <global id="testOut" value="androidTest/${slashedPackageName(packageName)}" /> <global id="unitTestOut" value="${escapeXmlAttribute(projectOut)}/src/test/java/${slashedPackageName(packageName)}" /> <global id="resOut" value="${resDir}" /> <global id="mavenUrl" value="mavenCentral" /> <global id="buildToolsVersion" value="18.0.1" /> <global id="gradlePluginVersion" value="0.6.+" /> <global id="unitTestsSupported" type="boolean" value="${(compareVersions(gradlePluginVersion, '1.1.0') >= 0)?string}" /> </globals> 

But they relate to different locations. projectOut refers to the module folder and topOut to the project folder. How does this happen with the same "." value?

Template location is android-studio-folder \ plugins \ android \ lib \ templates \ gradle -projects \ NewAndroidModule

+5
source share

Source: https://habr.com/ru/post/1261452/


All Articles