Skip to content

Commit

Permalink
Plugin本地使用 添加注释说明
Browse files Browse the repository at this point in the history
  • Loading branch information
yechao committed Aug 15, 2023
1 parent 4895770 commit e2ceec9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
22 changes: 16 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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')
}
}

Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pluginManagement {
google()
mavenCentral()
maven {
// 本地maven仓库地址
url './plugin/build/maven-repo'
}
}
Expand All @@ -24,6 +25,7 @@ dependencyResolutionManagement {
google()
mavenCentral()
maven {
// 本地maven仓库地址
url './plugin/build/maven-repo'
}
}
Expand Down

0 comments on commit e2ceec9

Please sign in to comment.