I'm trying to integrate Sentry into my app for crash monitoring. I have followed the Sentry docs step by step but now I'm getting the following warning:

WARNING: API 'variantOutput.getProcessManifest()' is obsolete and has been replaced with 'variantOutput.getProcessManifestProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getProcessManifest(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app

It is due to the changes that I've made to my gradle files. I couldn't find anything on SO or the Sentry docs regarding warnings of this nature. It points directly to apply plugin but even that is the most recent version according to their website:

build.gradle(Module):

apply plugin: 'com.android.application'
apply plugin: 'io.sentry.android.gradle'

android {

    compileSdkVersion 28
    defaultConfig {
        applicationId "com.ozbek.onur.memegenerator"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 6
        versionName "6.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            multiDexEnabled true
        }
    }
}

dependencies {
    ...
    implementation 'io.sentry:sentry-android:1.7.16'
    implementation 'org.slf4j:slf4j-nop:1.7.25'
}

build.gradle(Project):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

buildscript {
    dependencies {
        classpath 'io.sentry:sentry-android-gradle-plugin:1.7.16'
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

1 Answers

1
Bruno Garcia On Best Solutions

There's an issue on GitHub regarding this warning:

And here's a comment to why it wasn't dropped yet:

OK so it looks like the new API was only added in Gradle 4.8

I need our Plugin to work for people on 4.4 still, so I think we'll have to ignore this warning for now as people are slowly forced to use a newer Gradle by Play Store requirements.

There's also a second issue where someone posted a fix on his fork. As it was pointed out there, it requires now newer version of Gradle which means it'll break people using the older ones.