Quick Start
Integrate
Hikageinto your project.
Project Requirements
The project needs to be created using Android Studio or IntelliJ IDEA and must be an Android or Kotlin Multiplatform project with integrated Kotlin environment dependencies.
Android Studio (It is recommended to get the latest version from here)
IntelliJ IDEA (It is recommended to get the latest version from here)
Kotlin 1.9.0+, Gradle 8+, Java 17+, Android Gradle Plugin 8+
Configure Repositories
The dependencies of Hikage are published in Maven Central and our public repository, you can use the following method to configure repositories.
We recommend using Kotlin DSL as the Gradle build script language.
Configure dependency in your project's build.gradle.kts.
repositories {
google()
mavenCentral()
// (Optional) You can add this URL to use our public repository
// When Sonatype-OSS fails and cannot publish dependencies, this repository is added as a backup
// For details, please visit: https://github.com/HighCapable/maven-repository
maven("https://raw.githubusercontent.com/HighCapable/maven-repository/main/repository/releases")
}Configure Java Version
Modify the Java version of Kotlin in your project's build.gradle.kts to 17 or above.
Kotlin DSL
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}Quick Setup
Add the following content to your project's gradle/libs.versions.toml.
[versions]
# ...
hikage-plugin = "<plugin-version>"
hikage-bom = "<version>"
[plugins]
# ...
hikage = { id = "com.highcapable.hikage", version.ref = "hikage-plugin" }
[libraries]
# ...
hikage-bom = { module = "com.highcapable.hikage:hikage-bom", version.ref = "hikage-bom" }
hikage-core = { module = "com.highcapable.hikage:hikage-core" }
hikage-runtime = { module = "com.highcapable.hikage:hikage-runtime" }
# (Optional) If you want to introduce the runtime capability of XML attribute sets.
hikage-runtime-attribute = { module = "com.highcapable.hikage:hikage-runtime-attribute" }
hikage-extension = { module = "com.highcapable.hikage:hikage-extension" }- Replace
<plugin-version>with - Replace
<version>with
Next, add the following content to your project's build.gradle.kts.
plugins {
// ...
alias(libs.plugins.hikage)
}
dependencies {
// ...
implementation(platform(libs.hikage.bom))
implementation(libs.hikage.core)
implementation(libs.hikage.runtime)
// (Optional) If you want to introduce the runtime capability of XML attribute sets.
implementation(libs.hikage.runtime.attribute)
implementation(libs.hikage.extension)
}After clicking the Sync button to sync your project, Hikage will be successfully integrated into your project.
Then it is recommended to run a build once to ensure all layout components are generated.
Features Overview
The project is divided into multiple modules. You can choose the module you wish to include as a dependency in your project, but be sure to include the hikage-core module.
Click the corresponding module below to view detailed feature descriptions.
Version Notes
Starting from 1.1.0, Hikage started using unified versioning for releases. In most cases, you only need to pay attention to the same major version. You can also refer to the hikage-bom below to use BOM for unified dependency version management.
For details, please see the changelog.
- hikage-bom
- hikage-core
- hikage-compiler
- hikage-runtime
- hikage-runtime-attribute
- hikage-extension
- hikage-extension-betterandroid
- hikage-extension-compose
- hikage-widget-foundation
- hikage-widget-androidx
- hikage-widget-material
Gradle Plugins
Gradle plugins provide dependency assembly and simplified configuration capabilities for Hikage. It is recommended to use them in conjunction with runtime dependencies.
Demo
You can find some samples here to view the corresponding demo project to better understand how these functions work and quickly select the functions you need.