From 2a75ed18fb64005bc8a810574592a74ae997dfdf Mon Sep 17 00:00:00 2001 From: ChinaLike <572919350@qq.com> Date: Wed, 17 Apr 2024 15:23:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E3=80=8C=E9=87=8D=E6=9E=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 7 ++----- jsbridge-annotation/build.gradle | 28 +++++++++++++++++----------- jsbridge-compiler/build.gradle | 28 ++++++++++++++++------------ jsbridge/build.gradle | 4 ++-- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 29c43a4..e9152a4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,7 +18,7 @@ android { } buildTypes { - debug{ + debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } @@ -52,7 +52,6 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation project(path: ':jsbridge') implementation project(path: ':testGroup') -// implementation 'com.github.ChinaLike:JsBridge:0.0.9' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' @@ -63,9 +62,7 @@ dependencies { implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2' implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2' - implementation 'com.github.ChinaLike:jsbridge:0.1.0' -// kapt project(':jsbridge-compiler') - // implementation project(':library-annotation') + kapt project(':jsbridge-compiler') implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" } \ No newline at end of file diff --git a/jsbridge-annotation/build.gradle b/jsbridge-annotation/build.gradle index ee0cbf8..ab8c67a 100644 --- a/jsbridge-annotation/build.gradle +++ b/jsbridge-annotation/build.gradle @@ -2,24 +2,30 @@ plugins { id("java-library") id("org.jetbrains.kotlin.jvm") id("maven") + id 'maven-publish' } java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 + + withSourcesJar() + withJavadocJar() } -//==============================JitPack 上传插件配置 start===================== -apply plugin: 'com.github.dcendents.android-maven' -//组名 com.github是固定的,后面的ChinaLike是我Github的用户名,替换成你自己的就可以了 group='com.github.ChinaLike' +version='0.1.1' -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + from components.java + groupId = 'com.github.ChinaLike' + artifactId = 'jsbridge-annotation' + version = '0.1.1' + } + } } -} -//==============================JitPack 上传插件配置 end======================= \ No newline at end of file +} \ No newline at end of file diff --git a/jsbridge-compiler/build.gradle b/jsbridge-compiler/build.gradle index 0855020..3ce8e0b 100644 --- a/jsbridge-compiler/build.gradle +++ b/jsbridge-compiler/build.gradle @@ -1,6 +1,8 @@ plugins { id("java-library") id("org.jetbrains.kotlin.jvm") + id("maven") + id 'maven-publish' } java { @@ -9,8 +11,7 @@ java { } dependencies{ -// implementation(project(":jsbridge-annotation")) - implementation 'com.github.ChinaLike:jsbridge-annotation:0.1.0' + implementation(project(":jsbridge-annotation")) annotationProcessor("com.google.auto.service:auto-service:1.0-rc7") compileOnly("com.google.auto.service:auto-service-annotations:1.0-rc7") @@ -20,17 +21,20 @@ dependencies{ implementation("com.alibaba:fastjson:1.2.69") } -//==============================JitPack 上传插件配置 start===================== -apply plugin: 'com.github.dcendents.android-maven' -//组名 com.github是固定的,后面的ChinaLike是我Github的用户名,替换成你自己的就可以了 group='com.github.ChinaLike' +version='0.1.1' -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + from components.java + groupId = 'com.github.ChinaLike' + artifactId = 'jsbridge-compiler' + version = '0.1.1' + } + } } } -//==============================JitPack 上传插件配置 end======================= \ No newline at end of file + diff --git a/jsbridge/build.gradle b/jsbridge/build.gradle index cc50bf9..ca70279 100644 --- a/jsbridge/build.gradle +++ b/jsbridge/build.gradle @@ -38,8 +38,8 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1' implementation 'com.alibaba:fastjson:1.1.72.android' -// api project(':jsbridge-annotation') - api 'com.github.ChinaLike:jsbridge-annotation:0.1.0' + api project(':jsbridge-annotation') +// api 'com.github.ChinaLike:jsbridge-annotation:0.1.0' } //==============================JitPack 上传插件配置 start=====================