Android gradle version and plugins

Overview

android-gradle-plugin

Android gradle version and plugins

Version catalogs

Shared catalogs 를 사용한 android version catalogs 입니다.

Usage

settings.gradle.kts에 원격 저장소에 저장된 version catalogs를 생성합니다.

enableFeaturePreview("VERSION_CATALOGS")

dependencyResolutionManagement {
    repositories {
        maven {
            setUrl("https://maven.pkg.github.com/ethanette/android-gradle-plugin")
            credentials {
                username = System.getenv("GITHUB_USERNAME")
                password = System.getenv("GITHUB_ACCESS_TOKEN")
            }
        }
    }

    versionCatalogs {
        create("libs") {
            from("com.github.ethanette:version-catalog:0.1.6")
        }
    }
}

gradle sync 후 다음과 같은 version catalogs에 선언된 라이브러리 사용이 가능합니다. (version-catalog)

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
    alias(libs.plugins.android.application) apply false
    alias(libs.plugins.android.library) apply false
    alias(libs.plugins.jetbrains.kotlinAndroid) apply false
}
dependencies {
    implementation(libs.androidx.core.coreKtx)
    implementation(libs.androidx.compose.ui.ui)
    implementation(libs.androidx.compose.material.material)
    implementation(libs.androidx.compose.ui.uiToolingPreview)
    implementation(libs.androidx.lifecycle.lifecycleRuntimeKtx)
    implementation(libs.androidx.activity.activityCompose)
    testImplementation(libs.junit.junit)
    androidTestImplementation(libs.androidx.test.ext.junit)
    androidTestImplementation(libs.androidx.test.espresso.espressoCore)
    androidTestImplementation(libs.androidx.compose.ui.uiTestJunit4)
    androidTestImplementation(libs.androidx.compose.ui.uiTooling)
}

libs.versions.toml 을 사용하여 version catalogs 를 정의합니다.

libs.versions.toml 파일은 현재 정의된 버전 정보를 확인 할 수 있다.

Gradle Plugin

Custom Gradle Plugins 를 사용한 android custom gradle plugins 입니다.

Usage

settings.gradle.kts에 Gradle Plugin이 저장된 원격 저장소를 설정한다.

pluginManagement {
    repositories {
        maven {
            setUrl("https://maven.pkg.github.com/ethanette/android-gradle-plugin")
            credentials {
                username = System.getenv("GITHUB_USERNAME")
                password = System.getenv("GITHUB_ACCESS_TOKEN")
            }
        }
    }
}

gradle sync 후 프로젝트 build.gradle.kts에 사용하려고 하는 Gradle Plugin을 선언한다.

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
    alias(libs.plugins.ethanette.androidApp) apply false
    alias(libs.plugins.ethanette.compose) apply false
}

gradle sync 후 모듈 build.gradle.kts에 사용하려고 하는 Gradle Plugin을 사용하여 스크립트 설정이 가능합니다.

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
    id(libs.plugins.ethanette.androidApp.get().pluginId)
    id(libs.plugins.ethanette.compose.get().pluginId)
}

android {
    defaultConfig {
        applicationId = "com.bemily.messenger"
        versionName = "1.0.0"
        versionCode = 1
    }

    buildTypes {
        getByName("release") {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
}

dependencies {
    implementation(libs.androidx.core.coreKtx)
    implementation(libs.androidx.lifecycle.lifecycleRuntimeKtx)
    implementation(libs.androidx.activity.activityCompose)
}
You might also like...
 Gradle plugin which downloads and manages your Android SDK.
Gradle plugin which downloads and manages your Android SDK.

DEPRECATED This plugin is deprecated and is no longer being developed. Tools and dependencies are automatically downloaded using version 2.2.0 of the

CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native.

C Klib CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native. The Problem When you want to access C-etc code f

🤹 Common Kotlin utilities made for my personal usage, comes with SLF4J utilities, common extensions, common Gradle utilities, and more.

🤹 common-utils Common Kotlin utilities made for my personal usage, comes with SLF4J utilities, common extensions, ansi-colours, common Gradle utiliti

NukeJangala - Starsector Mod Template using Gradle and IntelliJ
NukeJangala - Starsector Mod Template using Gradle and IntelliJ

Starsector Mod Template using Gradle and IntelliJ v1.2.0 Description This is a t

NukePlanet - Starsector Mod Template using Gradle and IntelliJ
NukePlanet - Starsector Mod Template using Gradle and IntelliJ

Starsector Mod Template using Gradle and IntelliJ v1.2.0 Description This is a t

A gradle plugin to optimize built jars through individual file optimizations and increased compression

Machete Machete is a gradle plugin that attempts to optimize the size of output JARs through both individual file optimizations and overall compressio

[Deprecated] Android Studio IDE support for Android gradle unit tests. Prepared for Robolectric.
[Deprecated] Android Studio IDE support for Android gradle unit tests. Prepared for Robolectric.

#[Deprecated] Google has finally released a proper solution for unit testing. Therefore this plugin will no longer be activlty maintained. android-stu

A Gradle plugin to support the Groovy language for building Android apps

Groovy language support for Android Deprecated: This plugin has been deprecated in favor of Kotlin which has the full support of JetBrains and Google.

Releases(0.2.1)
Owner
null
Gradle Replace In Place (GRIP): a gradle plugin to update your documentation or any file with a simple gradle task

GRIP (Gradle Replace In-Place) A gradle tool to update some values in your (documentation) files by running a task. (inspired by Knit) Directives Inse

Grégory Lureau 2 Oct 18, 2022
Gradle plugin to use git tags as project version names

Version Name Gradle Plugin This plugin adds a kotlin extension function that provides a version name based on the latest git tag. How to use it ?? App

Doist 3 Mar 9, 2022
gradle-android-scala-plugin adds scala language support to official gradle android plugin

gradle-android-scala-plugin gradle-android-scala-plugin adds scala language support to official gradle android plugin. See also sample projects at htt

saturday06 345 Dec 10, 2022
Ownership-gradle-plugin - Gradle code ownership verification plugin

Gradle code ownership verification plugin A gradle plugin that will verify owner

null 4 Dec 15, 2022
⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the web

Capacitor Firebase ⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the web. Maintainers Maintainer GitHub Social Robin Genz robingenz @ro

Robin Genz 179 Dec 30, 2022
A webserver interface to the same methods and code that Cordova plugins install.

cordova-plugin-webserver Cordova plugin for localhost web server written in Kotlin and Ktor Install plugin cordova plugin add https://github.com/Qbix/

Qbix 0 May 5, 2022
My plugins for Aliucord, an android Discord client mod

Ven's Aliucord Plugins Click a Plugin's name to open a more detailed explanation Themer - Download Create and apply custom themes EmojiUtility - Downl

Ven 139 Dec 28, 2022
My (terrible) plugins for Aliucord

Plugins for Aliucord How to install: Join the Aliucord support server long press on my message in #plugins-list then click "Open PluginDownloader" Man

Animal 37 Nov 3, 2022
Library for testing highlighting in plugins for IDEA in KPHP format.

intellij-kphp-highlighting-test-adapter Library for testing highlighting in plugins for IDEA in KPHP format. Installation Kotlin DSL plugins { id(

Makhnev Petr 2 Jul 23, 2022
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.

Gradle Play Publisher Gradle Play Publisher is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and

null 3.9k Dec 30, 2022