Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19854

Define task in apply from script

$
0
0

Your included script has a different classloader to build.gradle. You can do this:

build.gradle

ext {
   HttpTask = io.github.httpbuilderng.http.HttpTask
} 
apply from: 'other.gradle'

other.gradle

task uploadBom (type: HttpTask) {...} 

Another option is to repeat the buildscript {...} dependencies in other.gradle


Viewing all articles
Browse latest Browse all 19854

Trending Articles