From e2ceec9caa258009a342e0fe789ab1bc365bb924 Mon Sep 17 00:00:00 2001 From: yechao Date: Wed, 16 Aug 2023 00:03:32 +0800 Subject: [PATCH] =?UTF-8?q?Plugin=E6=9C=AC=E5=9C=B0=E4=BD=BF=E7=94=A8=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 22 ++++++++++++++++------ build.gradle | 8 +++++++- settings.gradle | 2 ++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4aa3dd7..b412a9e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,17 +1,27 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' - id 'com.yechaoa.plugin.dependencies' +// id 'com.yechaoa.plugin.dependencies' } -printDependencies { - enable = true -} +/** + * 想看printDependencies效果: + * 1.先执行./gradlew publish发布本地 + * 2.再解开这里和上面插件的注释 //id 'com.yechaoa.plugin.dependencies' + * 3.还有project > build.gradle里面的classpath + */ +//printDependencies { +// enable = true +//} -// task 示例抽出去 解开注释可看效果 +/** + * task 示例抽出去 解开注释可看效果 + */ //apply from : '../task.gradle' -// plugin 示例抽出去 解开注释可看效果 +/** + * plugin 示例抽出去 解开注释可看效果 + */ //apply from : '../plugin.gradle' android { diff --git a/build.gradle b/build.gradle index 6d82d40..c290dc7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,12 @@ buildscript { dependencies { - classpath('com.yechaoa.plugin:dependencies:1.0.0') + /** + * 想看printDependencies效果: + * 1.先执行./gradlew publish发布本地 + * 2.再解开app > build.gradle里面的插件的注释 //id 'com.yechaoa.plugin.dependencies' + * 3.还有app > build.gradle里面的printDependencies + */ +// classpath('com.yechaoa.plugin:dependencies:1.0.0') } } diff --git a/settings.gradle b/settings.gradle index ed79866..d753710 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,7 @@ pluginManagement { google() mavenCentral() maven { + // 本地maven仓库地址 url './plugin/build/maven-repo' } } @@ -24,6 +25,7 @@ dependencyResolutionManagement { google() mavenCentral() maven { + // 本地maven仓库地址 url './plugin/build/maven-repo' } }