-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,12 @@ | ||
plugins { | ||
// 用作独立项目(A standalone project) | ||
// 需要把它移动到独立项目的根目录中,而且不能直接在根项目中应用这个自定义插件。 | ||
|
||
// 测试发现这上下两个没啥区别,仅有的区别是:如果存在`a.b.c.xxx.gradle`,则同时会生成以`a.b.c.xxx`为 ID 的插件。 | ||
|
||
// 用作预编译项目(Precompiled script plugins) | ||
// 保持当前的目录结构,可以直接在根项目中应用这个自定义插件。 | ||
// 该插件 ID 取`src/main/groovy/`目录下的`a.b.c.xxx.gradle`。 | ||
//id 'java-gradle-plugin' | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
// 如下配在可省略,如果存在`a.b.c.xxx.gradle`。 | ||
// 如果同时存在`a.b.c.xxx.gradle`,则同时会生成以`a.b.c.xxx`为 ID 的插件。 | ||
gradlePlugin { | ||
plugins { | ||
simplePlugin { | ||
scalroid { | ||
id = 'cash.bdo.scalroid' | ||
implementationClass = 'cash.bdo.ScalaAndroidCompatPlugin' | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
// 在预编译插件中使用外部插件,需要在此导入,然后在`src/main/groovy/a.b.c.xxx.gradle`文件 | ||
// 中写`plugins { id 'com.bmuschko.docker-remote-api' }`。 | ||
//implementation 'com.bmuschko:gradle-docker-plugin:6.4.0' | ||
|
||
// 应避免在此导入特定版本的包。因为此处的版本号会限制 | ||
// `plugins { | ||
// id 'com.android.application' version '7.3.1' apply false | ||
// id 'com.android.library' version '7.3.1' apply false | ||
// }` | ||
// 的版本号(通常在项目根目录下的 build.gradle 文件中)。 | ||
//implementation 'com.android.tools.build:gradle:7.3.1' | ||
|
||
// 测试框架:spock.lang.Specification | ||
testImplementation( | ||
//'junit:junit:4.12', | ||
//'org.codehaus.groovy:groovy-all:2.4.11', | ||
'org.spockframework:spock-core:1.3-groovy-2.4' | ||
) | ||
} |