Created
April 20, 2018 10:20
-
-
Save pavan538/619238c12e29132ca3186f14a27813c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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