Consuming Custom Plugin in remote repository

Dear Gradle experts,

I have implemented a custom plugin and deployed it as fatjar in remote artifactory. However, I am unable to find a way to consume it on build.gradle. Could you please help me to find out what is wrong on my gradle code?


//fatjar file is located http://artifactory.com/artifactory/syseng-dev-local/ttsclient/0.11/tts-all-0.11.jar
buildscript {

    repositories {
	        maven{
		    url: "http://artifactory.com/artifactory/syseng-dev-local/ttsclient/0.11/"
	        }
    }
dependencies {
	//classpath files (project.property('testiqClientJar'))
  }

}

apply plugin: ‘org.qa.tts’

testiqTask {

println("Running built-in task on custom plugin...!")

}


I run the task as > gradle -PtestiqClientJar=tts-all-0.11.jar testiqTask

and getting the following build errror

  • What went wrong:
    A problem occurred configuring root project 'tts.

Could not resolve all dependencies for configuration ‘:classpath’.
You must specify a URL for a Maven repository.

Any thoughts on this?

Hi
First you should declare your maven repository like maven{
url “http://artifactory.com/artifactory/syseng-dev-local
}

No “:”, and more importantly no group and version information.

Then, if you are declaring your dependency using an [external module dependency] (https://docs.gradle.org/current/userguide/dependency_management.html#sub:module_dependencies) you should declare it accordingly, and not by using a file dependency

Thanks a lot Francois. Your suggestion worked :smile: