Skip to content

Commit

Permalink
Update gradle configs (#25)
Browse files Browse the repository at this point in the history
* ref : migrate to from groovy to kts

* ref : remove deprecated options

* ref : change groupId

* add public api checker

* fix lint errors
  • Loading branch information
yveskalume authored Apr 23, 2024
1 parent ccd023e commit 58e8f3a
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 155 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build,Test and ktlintCheck
run: ./gradlew ktlintCheck test --stacktrace
- name: unit test, ktlint and public api check
run: ./gradlew ktlintCheck test check --stacktrace
15 changes: 0 additions & 15 deletions build.gradle

This file was deleted.

5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
id("com.android.application") version "8.2.2" apply false
id("com.android.library") version "8.2.2" apply false
id("org.jetbrains.kotlin.android") version "1.9.20" apply false
}
69 changes: 0 additions & 69 deletions sample/build.gradle

This file was deleted.

72 changes: 72 additions & 0 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
}

android {
namespace = "tech.devscast.validable_sample"
compileSdk = 34

defaultConfig {
applicationId = "tech.devscast.validable_sample"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

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

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.5"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {
implementation(project(":validable"))
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")

implementation(platform("androidx.compose:compose-bom:2024.04.00"))

implementation("androidx.compose.ui:ui")
implementation("androidx.activity:activity-compose:1.8.2")
implementation("androidx.compose.material:material")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.6.6")
debugImplementation("androidx.compose.ui:ui-tooling")
}
12 changes: 10 additions & 2 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
@file:Suppress("UnstableApiUsage")
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand All @@ -6,5 +14,5 @@ dependencyResolutionManagement {
}
}
rootProject.name = "Validable"
include ':validable'
include ':sample'
include(":validable")
include(":sample")
Loading

0 comments on commit 58e8f3a

Please sign in to comment.