Java Code Examples for org.gradle.util.DeprecationLogger#nagUserOfDiscontinuedMethod()

The following examples show how to use org.gradle.util.DeprecationLogger#nagUserOfDiscontinuedMethod() . 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: DefaultArtifactRepositoryContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public DependencyResolver addAfter(Object userDescription, final String beforeResolverName, Closure configureClosure) {
    if (!GUtil.isTrue(beforeResolverName)) {
        throw new InvalidUserDataException("You must specify beforeResolverName");
    }
    DeprecationLogger.nagUserOfDiscontinuedMethod("ArtifactRepositoryContainer.addAfter()");
    final ArtifactRepository before = getByName(beforeResolverName);

    return addCustomDependencyResolver(userDescription, configureClosure, new Action<ArtifactRepository>() {
        public void execute(ArtifactRepository repository) {
            int insertPos = indexOf(before) + 1;
            if (insertPos == size()) {
                DefaultArtifactRepositoryContainer.super.add(repository);
            } else {
                DefaultArtifactRepositoryContainer.this.add(insertPos, repository);
            }
        }
    });
}
 
Example 2
Source File: AbstractProject.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public Project childrenDependOnMe() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Project.childrenDependOnMe()");
    DeprecationLogger.whileDisabled(new Factory<Void>() {
        public Void create() {
            for (Project project : childProjects.values()) {
                project.dependsOn(getPath(), false);
            }
            return null;
        }
    });

    return this;
}
 
Example 3
Source File: MavenResolver.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Deprecated
public void setUseMavenMetadata(boolean useMavenMetadata) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("MavenResolver.setUseMavenMetadata(boolean)");
    this.useMavenMetadata = useMavenMetadata;
    if (useMavenMetadata) {
        this.versionLister = new ChainedVersionLister(
                new MavenVersionLister(getRepository()),
                new ResourceVersionLister(getRepository()));
    } else {
        this.versionLister = new ResourceVersionLister(getRepository());
    }
}
 
Example 4
Source File: AbstractProject.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void dependsOn(final String path) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Project.dependsOn(String path)");
    DeprecationLogger.whileDisabled(new Factory<Void>() {
        public Void create() {
            dependsOn(path, true);
            return null;
        }
    });
}
 
Example 5
Source File: DefaultArtifactRepositoryContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public List<DependencyResolver> getResolvers() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("ArtifactRepositoryContainer.getResolvers()");
    List<DependencyResolver> returnedResolvers = new ArrayList<DependencyResolver>();
    for (ArtifactRepository repository : this) {
        returnedResolvers.add(baseRepositoryFactory.toResolver(repository));
    }
    return returnedResolvers;
}
 
Example 6
Source File: DefaultArtifactRepositoryContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public List<DependencyResolver> getResolvers() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("ArtifactRepositoryContainer.getResolvers()");
    List<DependencyResolver> returnedResolvers = new ArrayList<DependencyResolver>();
    for (ArtifactRepository repository : this) {
        returnedResolvers.add(baseRepositoryFactory.toResolver(repository));
    }
    return returnedResolvers;
}
 
Example 7
Source File: DefaultArtifactRepositoryContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DependencyResolver addBefore(Object userDescription, final String afterResolverName, Closure configureClosure) {
    if (!GUtil.isTrue(afterResolverName)) {
        throw new InvalidUserDataException("You must specify afterResolverName");
    }
    DeprecationLogger.nagUserOfDiscontinuedMethod("ArtifactRepositoryContainer.addBefore()");
    final ArtifactRepository after = getByName(afterResolverName);
    return addCustomDependencyResolver(userDescription, configureClosure, new Action<ArtifactRepository>() {
        public void execute(ArtifactRepository repository) {
            DefaultArtifactRepositoryContainer.super.add(indexOf(after), repository);
        }
    });
}
 
Example 8
Source File: AbstractProject.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public Project childrenDependOnMe() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Project.childrenDependOnMe()");
    DeprecationLogger.whileDisabled(new Factory<Void>() {
        public Void create() {
            for (Project project : childProjects.values()) {
                project.dependsOn(getPath(), false);
            }
            return null;
        }
    });

    return this;
}
 
Example 9
Source File: AbstractProject.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void dependsOn(final String path) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Project.dependsOn(String path)");
    DeprecationLogger.whileDisabled(new Factory<Void>() {
        public Void create() {
            dependsOn(path, true);
            return null;
        }
    });
}
 
Example 10
Source File: DefaultArtifactRepositoryContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public boolean add(DependencyResolver resolver, Closure configureClosure) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("ArtifactRepositoryContainer.add(DependencyResolver, Closure)");
    addCustomDependencyResolver(resolver, configureClosure, addLastAction);
    return true;
}
 
Example 11
Source File: Compile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * This method was never intended to be used by the users.
 *
 * @param javaCompiler to set
 */
@Deprecated
public void setJavaCompiler(Compiler<JavaCompileSpec> javaCompiler) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Compile.setJavaCompiler(Compiler<JavaCompileSpec>)");
    this.cleaningCompiler = javaCompiler;
}
 
Example 12
Source File: Compile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * This method was never intended to be used by the users.
 *
 * @return the compiler
 */
@Deprecated
public Compiler<JavaCompileSpec> getJavaCompiler() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Compile.getJavaCompiler()");
    return cleaningCompiler;
}
 
Example 13
Source File: DefaultArtifactRepositoryContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public boolean add(DependencyResolver resolver) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("ArtifactRepositoryContainer.add(DependencyResolver)");
    addCustomDependencyResolver(resolver, null, addLastAction);
    return true;
}
 
Example 14
Source File: GradleLauncher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Deprecated
public static GradleLauncherFactory getFactory() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("GradleLauncher.getFactory()");
    return doGetFactory();
}
 
Example 15
Source File: Compile.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * This method was never intended to be used by the users.
 *
 * @return the compiler
 */
@Deprecated
public Compiler<JavaCompileSpec> getJavaCompiler() {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Compile.getJavaCompiler()");
    return cleaningCompiler;
}
 
Example 16
Source File: Compile.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * This method was never intended to be used by the users.
 *
 * @param javaCompiler to set
 */
@Deprecated
public void setJavaCompiler(Compiler<JavaCompileSpec> javaCompiler) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("Compile.setJavaCompiler(Compiler<JavaCompileSpec>)");
    this.cleaningCompiler = javaCompiler;
}
 
Example 17
Source File: GradleLauncher.java    From pushfish-android with BSD 2-Clause "Simplified" License 3 votes vote down vote up
/**
 * Returns a {@code GradleLauncher} instance based on the passed command line syntax arguments.
 *
 * @param commandLineArgs A String array where each element denotes an entry of the Gradle command line syntax
 * @return The {@code GradleLauncher}. Never returns null.
 * @deprecated Use the tooling API instead.
 */
@Deprecated
public static GradleLauncher newInstance(String... commandLineArgs) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("GradleLauncher.newInstance()");
    GradleLauncherFactory gradleLauncherFactory = doGetFactory();
    return gradleLauncherFactory.newInstance(gradleLauncherFactory.createStartParameter(commandLineArgs));
}
 
Example 18
Source File: GradleLauncher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 3 votes vote down vote up
/**
 * Returns a {@code GradleLauncher} instance based on the passed command line syntax arguments.
 *
 * @param commandLineArgs A String array where each element denotes an entry of the Gradle command line syntax
 * @return The {@code GradleLauncher}. Never returns null.
 * @deprecated Use the tooling API instead.
 */
@Deprecated
public static GradleLauncher newInstance(String... commandLineArgs) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("GradleLauncher.newInstance()");
    GradleLauncherFactory gradleLauncherFactory = doGetFactory();
    return gradleLauncherFactory.newInstance(gradleLauncherFactory.createStartParameter(commandLineArgs));
}
 
Example 19
Source File: GradleLauncher.java    From pushfish-android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns a {@code GradleLauncher} instance based on the passed start parameter.
 *
 * @param startParameter The start parameter object the GradleLauncher instance is initialized with
 * @return The {@code GradleLauncher}. Never returns null.
 * @deprecated Use the tooling API instead.
 */
@Deprecated
public static GradleLauncher newInstance(StartParameter startParameter) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("GradleLauncher.newInstance()");
    return doGetFactory().newInstance(startParameter);
}
 
Example 20
Source File: GradleLauncher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Returns a {@code GradleLauncher} instance based on the passed start parameter.
 *
 * @param startParameter The start parameter object the GradleLauncher instance is initialized with
 * @return The {@code GradleLauncher}. Never returns null.
 * @deprecated Use the tooling API instead.
 */
@Deprecated
public static GradleLauncher newInstance(StartParameter startParameter) {
    DeprecationLogger.nagUserOfDiscontinuedMethod("GradleLauncher.newInstance()");
    return doGetFactory().newInstance(startParameter);
}