Closed clwillingham closed 6 years ago
trying to add HttpTask to ftc_app android app: https://github.com/ftctechnh/ftc_app in the root build.gradle I changed it to:
buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' classpath "gradle.plugin.io.github.http-builder-ng:http-plugin:0.1.1" } }
in build.common.gradle, I changed the top to of the file to the following:
import java.util.regex.Pattern apply plugin: 'com.android.application' apply plugin: "io.github.http-builder-ng.http-plugin" http { library = 'apache' config { request.uri = 'http://localhost:1234' } } task notify(type:HttpTask){ config { request.uri = 'http://something.com' } post { request.uri.path = '/notify' request.body = [event: 'activated'] response.success { println 'The event notification was successful' } } }
when I sync the project, triggering a gradle build I receive the following error:
Could not get unknown property 'HttpTask' for project ':TeamCode' of type org.gradle.api.Project.
Solved, forgot to import import io.github.httpbuilderng.http.HttpTask
import io.github.httpbuilderng.http.HttpTask
trying to add HttpTask to ftc_app android app: https://github.com/ftctechnh/ftc_app in the root build.gradle I changed it to:
in build.common.gradle, I changed the top to of the file to the following:
when I sync the project, triggering a gradle build I receive the following error: