Last active
March 22, 2018 09:33
-
-
Save wangjiegulu/70c54ad5a43e5895a68d81a90198178c to your computer and use it in GitHub Desktop.
apply RapidMetaInfPlugin and RapidMavenPushPlugin
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
// apply maven push plugin, https://github.com/wangjiegulu/RapidMavenPushPlugin | |
apply plugin: 'com.github.wangjiegulu.plg.rapidmavenpush' | |
rapidMavenPush { | |
printProperties = true | |
abortOnError = false | |
disable = false | |
defaultMavenType = 'local' | |
mavens { | |
maven { | |
mavenType = 'local' | |
propertyFiles = [ | |
file("../mavenupload/maven_common.properties"), | |
file("mavenupload/maven_local.properties") | |
] | |
propertyInjectMode = 'replace' | |
} | |
maven { | |
mavenType = 'company' | |
propertyFiles = [ | |
file("../mavenupload/maven_common.properties"), | |
file("mavenupload/maven_company.properties") | |
] | |
propertyInjectMode = 'replace' | |
} | |
maven { | |
mavenType = 'central' | |
propertyFiles = [ | |
file("../mavenupload/maven_common.properties"), | |
file("mavenupload/maven_central.properties") | |
] | |
propertyInjectMode = 'replace' | |
} | |
} | |
} | |
// Apply meta-inf plugin, https://github.com/wangjiegulu/RapidMetaInfPlugin | |
import com.wangjiegulu.plg.rapidmavenpush.RapidParameterParser | |
apply plugin: 'com.github.wangjiegulu.plg.rapidmetainf' | |
project.afterEvaluate { | |
// META-INF properties | |
rapidmetainf { | |
RapidParameterParser rapidParameterParser = new RapidParameterParser(project) | |
metaInfName 'MVPARCHITECTURE.properties' | |
metaInfProperties "Archive-Name=${rapidParameterParser.getStringParameter('POM_ARCHIVE_ID')}", | |
"Archive-Version=${rapidParameterParser.getStringParameter('POM_ARCHIVE_VERSION_NAME')}", | |
"Archive-Url=${rapidParameterParser.getStringParameter('POM_URL')}", | |
"Author=${rapidParameterParser.getStringParameter('POM_DEVELOPER_NAME')}", | |
"Author-Email=${rapidParameterParser.getStringParameter('POM_DEVELOPER_EMAIL')}", | |
"Gradle-Version=${GradleVersion.current()}", | |
"Build-OS=${System.properties['os.name']}", | |
"Build-Java-Version=${System.getProperty("java.version")}", | |
"X-Compile-Target=${android.compileOptions.targetCompatibility}", | |
"X-Compile-Source=${android.compileOptions.sourceCompatibility}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment