Skip to content

Commit

Permalink
example: Convert example to a android library for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Omico committed Mar 19, 2022
1 parent a6c134d commit 0fcd3ff
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 21 deletions.
50 changes: 41 additions & 9 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,26 +1,58 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.6.10"
application
id("com.android.library") version "7.0.4"
kotlin("android") version "1.6.10"
}

group = "me.omico.gradm.example"
version = "1.0.0-SNAPSHOT"

repositories {
mavenCentral()
google()
}

android {
compileSdk = 32
defaultConfig {
minSdk = 26
}
}

dependencies {
// Accompanist
compileOnly(accompanist.insets)
compileOnly(accompanist.insetsUi)
compileOnly(accompanist.permissions)
compileOnly(accompanist.swipeRefresh)
compileOnly(accompanist.systemUiController)
// Androidx
compileOnly(androidx.activity.activityKtx)
compileOnly(androidx.activity.activityCompose)
compileOnly(androidx.annotation.annotation)
compileOnly(androidx.appcompat.appcompat)
compileOnly(androidx.camera.camera2)
compileOnly(androidx.camera.lifecycle)
compileOnly(androidx.camera.view)
compileOnly(androidx.compose.animation)
compileOnly(androidx.compose.foundation)
compileOnly(androidx.compose.material)
compileOnly(androidx.compose.materialIconsCore)
compileOnly(androidx.compose.materialIconsExtended)
compileOnly(androidx.compose.runtime)
compileOnly(androidx.compose.ui)
compileOnly(androidx.compose.uiTooling)
compileOnly(androidx.compose.uiToolingPreview)
compileOnly(androidx.compose.uiUtil)
compileOnly(androidx.core.coreKtx)
compileOnly(androidx.datastore.datastore)
compileOnly(androidx.lifecycle.runtimeKtx)
compileOnly(androidx.navigation.compose)
compileOnly(androidx.navigation.runtimeKtx)
// Square
compileOnly(square.okhttp3.dnsOverHttps)
compileOnly(square.okhttp3.interceptor.logging)
compileOnly(square.okhttp3.okhttp)
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}

application {
mainClass.set("MainKt")
}
6 changes: 1 addition & 5 deletions example/gradm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,13 @@ dependencies:
alias: annotation.annotation
version: ${versions.androidx.annotation}
- module: androidx.appcompat:appcompat
alias: appcompat
alias: appcompat.appcompat
version: ${versions.androidx.appcompat}
- module: androidx.camera:camera-camera2
alias: camera.camera2
version: ${versions.androidx.camera}
- module: androidx.camera:camera-lifecycle
alias: camera.lifecycle
version: ${versions.androidx.camera}
- module: androidx.camera:camera-view
alias: camera.view
version: ${versions.androidx.camera}
- module: androidx.compose.animation:animation
alias: compose.animation
Expand Down Expand Up @@ -106,7 +103,6 @@ dependencies:
alias: lifecycle.runtimeKtx
version: ${versions.androidx.lifecycle}
- module: androidx.navigation:navigation-compose
alias: navigation.compose
version: ${versions.androidx.navigation}
- module: androidx.navigation:navigation-runtime-ktx
alias: navigation.runtimeKtx
Expand Down
1 change: 1 addition & 0 deletions example/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rootProject.name = "gradm-example"
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
mavenLocal()
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots")
Expand Down
7 changes: 0 additions & 7 deletions example/src/main/kotlin/Main.kt

This file was deleted.

0 comments on commit 0fcd3ff

Please sign in to comment.