Skip to content

Getting Started

Ghasem Shirdel edited this page Aug 13, 2022 · 11 revisions

Download

Gradle Setup

Step 1. Add the JitPack repository to your build.gradle file

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.ghasemdev.affogato:AFFOGATO_MODULE:AFFOGATO_VERSION'
}

Maven Setup

Step 1. Add the JitPack repository to your build.gradle file

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the dependency

<dependency>
    <groupId>com.github.ghasemdev.affogato</groupId>
    <artifactId>AFFOGATO_MODULE</artifactId>
    <version>AFFOGATO_VERSION</version>
</dependency>

Getting Started

Compose Unit Size

The unit is one of the Jetpack Compose modules of this library, which can support relative screen sizes in sdp, ssp and custom create with @Dimen. Also, we can use rememberWindowSize() to know in which device we are (Compact, Medium, Expanded) or use postureState to build adaptive and responsive UIs in Foldables.

Setup

plugins {
    ...
    id("com.google.devtools.ksp") version "1.7.10-1.0.6"
}

android {
    ...
    kotlin {
        sourceSets.debug {
            kotlin.srcDir("build/generated/ksp/debug/kotlin")
        }
        sourceSets.release {
            kotlin.srcDir("build/generated/ksp/release/kotlin")
        }
    }
}

dependencies {
    implementation 'com.github.ghasemdev.affogato:affogato-unit:AFFOGATO_VERSION'
    ksp 'com.github.ghasemdev.affogato:affogato-unit-processor:AFFOGATO_VERSION'
}

More on the Compose Unit Size

👈 back to Introduction

👉 go to Core-ktx