Skip to content

Instantly share code, notes, and snippets.

@pavan538
Created April 20, 2018 10:20
Show Gist options
  • Save pavan538/619238c12e29132ca3186f14a27813c2 to your computer and use it in GitHub Desktop.
Save pavan538/619238c12e29132ca3186f14a27813c2 to your computer and use it in GitHub Desktop.
class YoutubExtension {
def featureName
}
class YoutubePlugin implements Plugin<Project>{
@Override
void apply(Project target) {
def extension = target.extensions.create("features", YoutubExtension)
target.task("play"){
doLast {
println "Playing YoutubeVideo " + extension.featureName
}
}
target.task("pause"){
doLast {
println "Pausing Youtube video"
}
}
}
}
group 'com.test.api'
version '1.0'
apply plugin: 'java'
apply plugin: YoutubePlugin
sourceCompatibility = 1.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment