From 04d824e0b10c686c0c8a799c5b5e6f28c912bdcf Mon Sep 17 00:00:00 2001 From: F1ReKing <284061805@qq.com> Date: Fri, 1 Nov 2019 17:32:59 +0800 Subject: [PATCH] =?UTF-8?q?1.0=E7=89=88=E6=9C=AC=E5=8F=91=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- jitpack.gradle | 30 ++++++++++++++++++++++++++++++ serialportlib/build.gradle | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 jitpack.gradle diff --git a/build.gradle b/build.gradle index 48947c3..dd2555c 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.5.1' - + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/jitpack.gradle b/jitpack.gradle new file mode 100644 index 0000000..adfb24b --- /dev/null +++ b/jitpack.gradle @@ -0,0 +1,30 @@ +apply plugin: 'com.github.dcendents.android-maven' + +group = 'com.github.f1reking' + +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +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 +} + + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} \ No newline at end of file diff --git a/serialportlib/build.gradle b/serialportlib/build.gradle index 56d63c9..da06396 100644 --- a/serialportlib/build.gradle +++ b/serialportlib/build.gradle @@ -36,3 +36,4 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } +apply from: '../jitpack.gradle'