Quick Start

Integrate BetterAndroid into your project.

Project Requirements

The project needs to be created using Android Studio or IntelliJ IDEA and be of type Android or Kotlin Multiplatform project and have integrated Kotlin environment dependencies.

Configure Repositories

The dependencies of BetterAndroid 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 and SweetDependencyopen in new window to manage dependencies.

Configure repositories in your project's SweetDependency configuration file.

repositories:
  google:
  maven-central:
  # (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
  highcapable-maven-releases:
    url: https://raw.githubusercontent.com/HighCapable/maven-repository/main/repository/releases

Traditional Method

Configure repositories in your project 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 build.gradle.kts to 17 or above.

Kotlin DSL

android {
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
}

Functional Overview

The entire project is divided into multiple modules, these modules can exist independently of each other or depend on each other, you can choose the modules you want to introduce as dependencies and apply them to your project.

You can click on the corresponding modules below to view detailed function introduction.

Project Template

You can use the project template we provide to quickly create a project that integrates BetterAndroid dependencies.

Demo

You can find some samples hereopen in new window view the corresponding demo project to better understand how these functions work and quickly select the functions you need.

At present, the demo function is not yet complete, and may be gradually improved in the future.

But you can directly read the existing documents, which are sufficient to introduce related functions.

If you are using Jetpack Compose, you can refer to Flexi UIopen in new window.