在app的build.gradle
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
}
}
在module下build.gradle处添加
apply plugin: "com.github.johnrengelman.shadow"
shadowJar {
manifest.attributes.put("Implementation-Version", archiveVersion)
manifest.attributes.put("Main-Class", "com.transsion.hprofparse.main.HprofAgent")
}
官方 Gradle - Plugin: com.github.johnrengelman.shadowhttps://plugins.gradle.org/plugin/com.github.johnrengelman.shadow



