Skip to content

Gradle : deprecated leftshift  #23

Description

@JayabalM

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

The deprecated leftShift used in mobileprintsdk/build.gradle


task javadoc(type: Javadoc) << {
        source = android.sourceSets.main.java.srcDirs
        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task copyAarFile(type: Copy)  {
        def myDir = System.getProperty("user.dir")
        def myFile = "mobileprintsdk.aar"

        from("${myDir}/app/build/outputs/aar/")
        into("${myDir}/")
        include("mobileprintsdk.aar")
}

Update with doLast() as follows


task javadoc(type: Javadoc) {

    doLast {
        source = android.sourceSets.main.java.srcDirs
        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    }
}

task copyAarFile(type: Copy)  {
    doLast {
        def myDir = System.getProperty("user.dir")
        def myFile = "mobileprintsdk.aar"

        from("${myDir}/app/build/outputs/aar/")
        into("${myDir}/")
        include("mobileprintsdk.aar")
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions