Groovy项目基础配置

Henry...小于 1 分钟

Groovy项目基础配置

Groovy项目配置,参见项目模板open in new window

配置 wrapper

distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip

配置 setting.gradle

plugins {
    id("pub.ihub.plugin.ihub-settings") version "1.3.3"
}

配置 build.gradle

引入Groovy插件(ihub-groovy)、测试插件(ihub-test)以及验证插件(ihub-verification),配置ihub-git-hooks插件钩子命令:

plugins {
    id("pub.ihub.plugin.ihub-groovy")
    id("pub.ihub.plugin.ihub-test")
    id("pub.ihub.plugin.ihub-verification")
    id("pub.ihub.plugin.ihub-git-hooks")
}

iHubGitHooks {
    hooks.set(mapOf(
        "pre-commit" to "./gradlew build",
        "commit-msg" to "./gradlew commitCheck"
    ))
}

配置 gradle.properties

配置项目名称以及group,其中nameihub-settings插件扩展属性group为原生项目属性

name=demo
group=pub.ihub.demo
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v2.15.0