From 1ead0e37a1953bd70db930a5881c8fa8d315e868 Mon Sep 17 00:00:00 2001 From: "AllenCoder@126.com" Date: Tue, 28 Mar 2017 23:12:28 +0800 Subject: [PATCH] upload readme --- apputils/build.gradle | 2 ++ build.gradle | 1 + dbutils/build.gradle | 3 ++- gradle.properties | 21 ++++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- mediautil/build.gradle | 3 ++- uploadSource.gradle | 34 ++++++++++++++++++++++++ 7 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 uploadSource.gradle diff --git a/apputils/build.gradle b/apputils/build.gradle index b88f062..d3694d8 100644 --- a/apputils/build.gradle +++ b/apputils/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -29,3 +30,4 @@ dependencies { compile ("com.android.support:appcompat-v7:${rootProject.ext.supportVersion}") testCompile 'junit:junit:4.12' } +apply from: '../uploadSource.gradle' diff --git a/build.gradle b/build.gradle index 542ef69..4905c96 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/dbutils/build.gradle b/dbutils/build.gradle index ab58a0e..1e971fa 100644 --- a/dbutils/build.gradle +++ b/dbutils/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'com.android.library' - +apply plugin: 'com.github.dcendents.android-maven' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion @@ -29,3 +29,4 @@ dependencies { compile 'com.android.support:appcompat-v7:25.3.0' testCompile 'junit:junit:4.12' } +apply from: '../uploadSource.gradle' diff --git a/gradle.properties b/gradle.properties index aac7c9b..9ce97a3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,20 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - +## Project-wide Gradle settings. +# # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - +# # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m - +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +#Tue Mar 28 22:57:27 CST 2017 +systemProp.https.proxyPort=1080 +systemProp.http.proxyHost=127.0.0.1 +org.gradle.jvmargs=-Xmx1536m +systemProp.https.proxyHost=127.0.0.1 +systemProp.http.proxyPort=1080 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5a10b9a..9a58cbd 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip diff --git a/mediautil/build.gradle b/mediautil/build.gradle index 6e54007..4d14a0f 100644 --- a/mediautil/build.gradle +++ b/mediautil/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'com.android.library' - +apply plugin: 'com.github.dcendents.android-maven' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion @@ -29,3 +29,4 @@ dependencies { compile 'com.android.support:appcompat-v7:25.3.0' testCompile 'junit:junit:4.12' } +apply from: '../uploadSource.gradle' diff --git a/uploadSource.gradle b/uploadSource.gradle new file mode 100644 index 0000000..23b44fd --- /dev/null +++ b/uploadSource.gradle @@ -0,0 +1,34 @@ +// 打包源码jar +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +task javadoc(type: Javadoc) { + failOnError false + source = android.sourceSets.main.java.sourceFiles + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + classpath += configurations.compile +} + +// 打包文档jar +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +}