Skip to main content

Kotlin Project Base Configuration

Henry...Less than 1 minute

Kotlin Project Base Configuration

Kotlin Project configuration, seeProject Templateopen in new window

Configure wrapper

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

Configure setting.gradle

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

Configure build.gradle

Import Kotlin plugin (ihub-kotrin), test plugin (ihub-test) and validation plugin (ihub-certification), configihub-git-hooksplugin hook command:

Kotlin
plugins {
    id("pub.ihub.plugin.ihub-kotlin")
    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"
    ))
}

Configure gradle.properties

Configure project names and groups, wherenameisihub-settingspluginextension properties,groupnative project properties

name=demo
group=pub.ihub.demo