Skip to content

Commit

Permalink
move library build.gradle → kts
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikgopal committed Apr 25, 2023
1 parent 7531d4f commit 95a8220
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 59 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Expand Up @@ -6,10 +6,10 @@ plugins {
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()

namespace = "com.instacart.sample"

compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
applicationId = "com.instacart.truetime"
minSdk = libs.versions.minSdk.get().toInt()
Expand Down
56 changes: 0 additions & 56 deletions library/build.gradle

This file was deleted.

45 changes: 45 additions & 0 deletions library/build.gradle.kts
@@ -0,0 +1,45 @@
// remove this on upgrading android gradle plugin to 8
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
id("maven-publish")
}

android {
namespace = "com.instacart.truetime"

compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
aarMetadata { minCompileSdk = libs.versions.compileSdk.get().toInt() }
}

buildTypes { getByName("release") { isMinifyEnabled = false } }

buildFeatures { buildConfig = false }

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
}

dependencies { api(libs.kotlinx.coroutines.core) }

afterEvaluate {
publishing {
publications {
register<MavenPublication>("release") {
groupId = "com.instacart"
artifactId = "truetime"
version = libs.versions.trueTime.get()
afterEvaluate { from(components["release"]) }
}
}
}
}
2 changes: 1 addition & 1 deletion library/proguard-rules.pro
Expand Up @@ -2,7 +2,7 @@
# By default, the flags in this file are appended to flags specified
# in /Users/kaushikgopal/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# directive in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down

0 comments on commit 95a8220

Please sign in to comment.