org.gradle.tooling.model.GradleModuleVersion Java Examples

The following examples show how to use org.gradle.tooling.model.GradleModuleVersion. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GradleDependencyAdapter.java    From thorntail with Apache License 2.0 6 votes vote down vote up
/**
 * Compute the dependencies of a given {@code IdeaModule} and group them by their scope.
 *
 * Note: This method does not follow project->project dependencies. It just makes a note of them in a separate collection.
 *
 * @param module the IdeaModule reference.
 */
@SuppressWarnings("UnstableApiUsage")
private void computeProjectDependencies(IdeaModule module) {
    ARTIFACT_DEPS_OF_PRJ.computeIfAbsent(module.getName(), moduleName -> {
        Map<String, Set<ArtifactSpec>> dependencies = new HashMap<>();
        module.getDependencies().forEach(dep -> {
            if (dep instanceof IdeaModuleDependency) {
                // Add the dependency to the list.
                String name = ((IdeaModuleDependency) dep).getTargetModuleName();
                PRJ_DEPS_OF_PRJ.computeIfAbsent(moduleName, key -> new HashSet<>()).add(name);
            } else if (dep instanceof ExternalDependency) {
                ExternalDependency extDep = (ExternalDependency) dep;
                GradleModuleVersion gav = extDep.getGradleModuleVersion();
                ArtifactSpec spec = new ArtifactSpec("compile", gav.getGroup(), gav.getName(), gav.getVersion(),
                                                     "jar", null, extDep.getFile());
                String depScope = dep.getScope().getScope();
                dependencies.computeIfAbsent(depScope, s -> new HashSet<>()).add(spec);
            }
        });
        return dependencies;
    });
}
 
Example #2
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultIdeaSingleEntryLibraryDependency setGradleModuleVersion(GradleModuleVersion moduleVersion) {
    this.moduleVersion = moduleVersion;
    return this;
}
 
Example #3
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #4
Source File: DefaultEclipseExternalDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #5
Source File: DefaultGradlePublication.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultGradlePublication setId(GradleModuleVersion id) {
    this.id = id;
    return this;
}
 
Example #6
Source File: DefaultGradlePublication.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getId() {
    return id;
}
 
Example #7
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultIdeaSingleEntryLibraryDependency setGradleModuleVersion(GradleModuleVersion moduleVersion) {
    this.moduleVersion = moduleVersion;
    return this;
}
 
Example #8
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #9
Source File: DefaultEclipseExternalDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #10
Source File: DefaultGradlePublication.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultGradlePublication setId(GradleModuleVersion id) {
    this.id = id;
    return this;
}
 
Example #11
Source File: DefaultGradlePublication.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getId() {
    return id;
}
 
Example #12
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultIdeaSingleEntryLibraryDependency setGradleModuleVersion(GradleModuleVersion moduleVersion) {
    this.moduleVersion = moduleVersion;
    return this;
}
 
Example #13
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #14
Source File: DefaultEclipseExternalDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #15
Source File: DefaultGradlePublication.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultGradlePublication setId(GradleModuleVersion id) {
    this.id = id;
    return this;
}
 
Example #16
Source File: DefaultGradlePublication.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getId() {
    return id;
}
 
Example #17
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultIdeaSingleEntryLibraryDependency setGradleModuleVersion(GradleModuleVersion moduleVersion) {
    this.moduleVersion = moduleVersion;
    return this;
}
 
Example #18
Source File: DefaultIdeaSingleEntryLibraryDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #19
Source File: DefaultEclipseExternalDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getGradleModuleVersion() {
    return moduleVersion;
}
 
Example #20
Source File: DefaultGradlePublication.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultGradlePublication setId(GradleModuleVersion id) {
    this.id = id;
    return this;
}
 
Example #21
Source File: DefaultGradlePublication.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public GradleModuleVersion getId() {
    return id;
}
 
Example #22
Source File: GradlePublication.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns the unique identifier of the publication.
 *
 * @return the unique identifier of the publication
 */
GradleModuleVersion getId();
 
Example #23
Source File: GradlePublication.java    From pushfish-android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns the unique identifier of the publication.
 *
 * @return the unique identifier of the publication
 */
GradleModuleVersion getId();
 
Example #24
Source File: GradlePublication.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns the unique identifier of the publication.
 *
 * @return the unique identifier of the publication
 */
GradleModuleVersion getId();
 
Example #25
Source File: GradlePublication.java    From pushfish-android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns the unique identifier of the publication.
 *
 * @return the unique identifier of the publication
 */
GradleModuleVersion getId();