Package com.uber.okbuck.core.model.jvm
Class JvmTarget
- java.lang.Object
-
- com.uber.okbuck.core.model.base.Target
-
- com.uber.okbuck.core.model.jvm.JvmTarget
-
- Direct Known Subclasses:
AndroidTarget
public class JvmTarget extends Target
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisKotlinprotected static java.lang.StringJAVA_COMPILER_EXTRA_ARGUMENTSprotected static java.lang.StringKOTLIN_COMPILER_EXTRA_ARGUMENTSprotected static java.lang.StringKOTLIN_COMPILER_PLUGINSstatic java.lang.StringMAIN
-
Constructor Summary
Constructors Constructor Description JvmTarget(org.gradle.api.Project project, java.lang.String name)JvmTarget(org.gradle.api.Project project, java.lang.String name, java.lang.String aptConfigurationName, java.lang.String testAptConfigurationName, java.lang.String integrationTestAptConfigurationName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<OExternalDependency>getApiExternalDeps()api external depsjava.util.Set<Target>getApiTargetDeps()api target depsjava.util.Set<JvmPlugin>getApPlugins()List of annotation processor classes.ScopegetApt()Apt Scope Used to get the annotation processor deps of the target.protected ScopegetAptScopeForConfiguration(java.lang.String configurationName)protected ScopegetAptScopeForConfiguration(org.gradle.api.artifacts.Configuration configuration)java.util.List<Scope>getAptScopes()Apt Scopesjava.util.Set<java.lang.String>getExcludes()java.util.Set<OExternalDependency>getExternalAarDeps(SourceSetType sourceSetType)java.util.Set<OExternalDependency>getExternalAptDeps(SourceSetType sourceSetType)Get apt target deps.java.util.Set<OExternalDependency>getExternalDeps(SourceSetType sourceSetType)Get implementation target deps.java.util.Set<OExternalDependency>getExternalExportedAarDeps(SourceSetType sourceSetType)java.util.Set<OExternalDependency>getExternalExportedDeps(SourceSetType sourceSetType)Get api target deps.java.util.Set<OExternalDependency>getExternalProvidedDeps(SourceSetType sourceSetType)Get compileOnly target deps.ScopegetIntegrationTest()java.util.Set<JvmPlugin>getIntegrationTestApPlugins()List of integration test annotation processor classes.ScopegetIntegrationTestApt()Integration Test Apt Scopejava.util.List<Scope>getIntegrationTestAptScopes()Integration Test Apt ScopesTestOptionsgetIntegrationTestOptions()ScopegetIntegrationTestProvided()Integration Test Provided Scopeprotected java.util.List<java.lang.String>getKotlinCompilerOptions()protected java.util.List<java.lang.String>getKotlinCompilerPlugins()java.util.Map<java.lang.String,java.util.List<java.lang.String>>getKotlinFriendPaths(boolean isTest)For Kotlin tests, a special extra friend-paths argument needs to be passed to read internal elements.ScopegetLint()Lint Scopecom.android.builder.model.LintOptionsgetLintOptions()ScopegetMain()java.lang.StringgetMainClass()java.lang.StringgetMavenCoords()ScopegetProvided()Provided Scopejava.lang.StringgetSourceCompatibility()java.util.Set<Target>getTargetAptDeps(SourceSetType sourceSetType)Get apt target deps.java.lang.StringgetTargetCompatibility()java.util.Set<Target>getTargetDeps(SourceSetType sourceSetType)Get implementation target deps.java.util.Set<Target>getTargetExportedDeps(SourceSetType sourceSetType)Get api target deps.java.util.Set<Target>getTargetProvidedDeps(SourceSetType sourceSetType)Get compileOnly target deps.ScopegetTest()java.util.Set<JvmPlugin>getTestApPlugins()List of test annotation processor classes.ScopegetTestApt()Test Apt Scopejava.util.List<Scope>getTestAptScopes()Test Apt ScopesTestOptionsgetTestOptions()The test optionsScopegetTestProvided()Test Provided ScopebooleanhasApplication()static java.lang.StringjavaVersion(org.gradle.api.JavaVersion version)-
Methods inherited from class com.uber.okbuck.core.model.base.Target
getAvailable, getExtraOpts, getIdentifier, getName, getOkbuck, getPath, getProject, getProp, getRootProject
-
-
-
-
Field Detail
-
MAIN
public static final java.lang.String MAIN
- See Also:
- Constant Field Values
-
JAVA_COMPILER_EXTRA_ARGUMENTS
protected static final java.lang.String JAVA_COMPILER_EXTRA_ARGUMENTS
- See Also:
- Constant Field Values
-
KOTLIN_COMPILER_PLUGINS
protected static final java.lang.String KOTLIN_COMPILER_PLUGINS
- See Also:
- Constant Field Values
-
KOTLIN_COMPILER_EXTRA_ARGUMENTS
protected static final java.lang.String KOTLIN_COMPILER_EXTRA_ARGUMENTS
- See Also:
- Constant Field Values
-
isKotlin
protected final boolean isKotlin
-
-
Constructor Detail
-
JvmTarget
public JvmTarget(org.gradle.api.Project project, java.lang.String name)
-
JvmTarget
public JvmTarget(org.gradle.api.Project project, java.lang.String name, java.lang.String aptConfigurationName, java.lang.String testAptConfigurationName, java.lang.String integrationTestAptConfigurationName)
-
-
Method Detail
-
getTestOptions
public TestOptions getTestOptions()
The test options- Returns:
- The test options
-
getIntegrationTestOptions
public TestOptions getIntegrationTestOptions()
-
getAptScopes
public java.util.List<Scope> getAptScopes()
Apt Scopes
-
getTestAptScopes
public java.util.List<Scope> getTestAptScopes()
Test Apt Scopes
-
getIntegrationTestAptScopes
public java.util.List<Scope> getIntegrationTestAptScopes()
Integration Test Apt Scopes
-
getApt
public Scope getApt()
Apt Scope Used to get the annotation processor deps of the target.
-
getTestApt
public Scope getTestApt()
Test Apt Scope
-
getIntegrationTestApt
public Scope getIntegrationTestApt()
Integration Test Apt Scope
-
getAptScopeForConfiguration
protected Scope getAptScopeForConfiguration(java.lang.String configurationName)
-
getAptScopeForConfiguration
protected Scope getAptScopeForConfiguration(org.gradle.api.artifacts.Configuration configuration)
-
getProvided
public Scope getProvided()
Provided Scope
-
getTestProvided
public Scope getTestProvided()
Test Provided Scope
-
getIntegrationTestProvided
public Scope getIntegrationTestProvided()
Integration Test Provided Scope
-
getApiExternalDeps
public java.util.Set<OExternalDependency> getApiExternalDeps()
api external deps
-
getApiTargetDeps
public java.util.Set<Target> getApiTargetDeps()
api target deps
-
getLint
public Scope getLint()
Lint Scope
-
getLintOptions
@Nullable public com.android.builder.model.LintOptions getLintOptions()
-
getApPlugins
public java.util.Set<JvmPlugin> getApPlugins()
List of annotation processor classes. If annotation processor plugin is enabled returns the annotation processor's UID.
-
getTestApPlugins
public java.util.Set<JvmPlugin> getTestApPlugins()
List of test annotation processor classes. If annotation processor plugin is enabled returns the annotation processor's UID.
-
getIntegrationTestApPlugins
public java.util.Set<JvmPlugin> getIntegrationTestApPlugins()
List of integration test annotation processor classes. If annotation processor plugin is enabled returns the annotation processor's UID.
-
getMain
public Scope getMain()
-
getTest
public Scope getTest()
-
getIntegrationTest
public Scope getIntegrationTest()
-
getSourceCompatibility
public java.lang.String getSourceCompatibility()
-
getTargetCompatibility
public java.lang.String getTargetCompatibility()
-
getMavenCoords
public java.lang.String getMavenCoords()
-
hasApplication
public boolean hasApplication()
-
getMainClass
@Nullable public java.lang.String getMainClass()
-
getExcludes
public java.util.Set<java.lang.String> getExcludes()
-
javaVersion
public static java.lang.String javaVersion(org.gradle.api.JavaVersion version)
-
getKotlinFriendPaths
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getKotlinFriendPaths(boolean isTest)
For Kotlin tests, a special extra friend-paths argument needs to be passed to read internal elements. See https://github.com/uber/okbuck/issues/709- Parameters:
isTest- is test target- Returns:
- the list with all friend paths
-
getKotlinCompilerPlugins
protected java.util.List<java.lang.String> getKotlinCompilerPlugins()
-
getKotlinCompilerOptions
protected java.util.List<java.lang.String> getKotlinCompilerOptions()
-
getTargetDeps
public java.util.Set<Target> getTargetDeps(SourceSetType sourceSetType)
Get implementation target deps. deps = (runtimeClasspath(api + implementation + runtimeOnly) intersection compileClasspath(api + implementation + compileOnly)) - api- Returns:
- Target deps
-
getTargetExportedDeps
public java.util.Set<Target> getTargetExportedDeps(SourceSetType sourceSetType)
Get api target deps. exportedDeps = api- Returns:
- Target deps
-
getTargetAptDeps
public java.util.Set<Target> getTargetAptDeps(SourceSetType sourceSetType)
Get apt target deps. exportedDeps = apt- Returns:
- Target deps
-
getTargetProvidedDeps
public java.util.Set<Target> getTargetProvidedDeps(SourceSetType sourceSetType)
Get compileOnly target deps. compileOnlyDeps = compileClasspath(api + implementation + compileOnly) - runtimeClasspath(api + implementation + runtimeOnly)- Returns:
- CompileOnly Target deps
-
getExternalDeps
public java.util.Set<OExternalDependency> getExternalDeps(SourceSetType sourceSetType)
Get implementation target deps. deps = (runtimeClasspath(api + implementation + runtimeOnly) intersection compileClasspath(api + implementation + compileOnly)) - api- Returns:
- Target deps
-
getExternalAarDeps
public java.util.Set<OExternalDependency> getExternalAarDeps(SourceSetType sourceSetType)
-
getExternalExportedDeps
public java.util.Set<OExternalDependency> getExternalExportedDeps(SourceSetType sourceSetType)
Get api target deps. exportedDeps = api- Returns:
- Target deps
-
getExternalExportedAarDeps
public java.util.Set<OExternalDependency> getExternalExportedAarDeps(SourceSetType sourceSetType)
-
getExternalAptDeps
public java.util.Set<OExternalDependency> getExternalAptDeps(SourceSetType sourceSetType)
Get apt target deps. exportedDeps = apt- Returns:
- Target deps
-
getExternalProvidedDeps
public java.util.Set<OExternalDependency> getExternalProvidedDeps(SourceSetType sourceSetType)
Get compileOnly target deps. compileOnlyDeps = compileClasspath(api + implementation + compileOnly) - runtimeClasspath(api + implementation + runtimeOnly)- Returns:
- CompileOnly Target deps
-
-