Skip to content

Instantly share code, notes, and snippets.

View peacepassion's full-sized avatar

Peace Da peacepassion

View GitHub Profile
public class FirstGist {
public static void main(String[] args) {
System.out.println("Hello Gist");
}
}
# First slide
Bla...
---
# Second slide
Bla...
@peacepassion
peacepassion / MyPlugin.groovy
Last active August 15, 2016 08:09
Way to get some important information of Android gradle plugin
project.android.applicationVariants.all { ApkVariant variant ->
println "variant class: ${variant.getClass()}"
ApplicationVariantImpl variant2 = (ApplicationVariantImpl) variant;
Field field = ApplicationVariantImpl.class.getDeclaredField("variantData")
field.setAccessible(true)
ApplicationVariantData data = field.get(variant2)
VariantScopeImpl scope = data.getScope();
field = BaseVariantData.class.getDeclaredField('taskManager')
field.setAccessible(true)
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:/Users/peacepassion/Desktop/maven_repo")
pom {
setGroupId 'me.ele'
setArtifactId 'amigo-lib'
setVersion '0.0.10'
public class Demo {
}