Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e37b9b0 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Remove OpenTasks API-related configuration

parent ad07503b
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -100,21 +100,3 @@ if (project.hasProperty('PLAY_STORE_SERVICE_ACCOUNT_CREDENTIALS')) {
        }
    }
}

task postVersion {
    doLast {
        if (project.hasProperty('OPENTASKS_API_KEY')) {
            // publish version number on api.opentasks.app
            ((HttpURLConnection) new URL('https://opentasks-app.appspot.com/v1/app/latest_version/').openConnection()).with({
                requestMethod = 'POST'
                doOutput = true
                setRequestProperty('Content-Type', 'application/x-www-form-urlencoded')
                setRequestProperty('Authorization', "Token token=\"${OPENTASKS_API_KEY}\"")
                outputStream.withPrintWriter({ printWriter ->
                    printWriter.write("version_code=${project.android.defaultConfig.versionCode}&version_name=${project.android.defaultConfig.versionName}")
                })
                content
            })
        }
    }
}