-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to build.gradle.kts kotlin dsl
- Loading branch information
1 parent
374fb9d
commit 0c02ddf
Showing
12 changed files
with
264 additions
and
201 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
plugins { | ||
id("com.android.application") | ||
kotlin("android") | ||
id("kotlin-kapt") | ||
} | ||
|
||
android { | ||
|
||
compileSdk = ProjectSetting.PROJECT_COMPILE_SDK | ||
|
||
defaultConfig { | ||
applicationId = ProjectSetting.PROJECT_APP_ID | ||
minSdk = ProjectSetting.PROJECT_MIN_SDK | ||
targetSdk = ProjectSetting.PROJECT_TARGET_SDK | ||
versionCode = ProjectSetting.PROJECT_VERSION_CODE | ||
versionName = ProjectSetting.PROJECT_VERSION_NAME | ||
|
||
multiDexEnabled = true | ||
vectorDrawables.useSupportLibrary = true | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
// Naming APK // AAB | ||
setProperty("archivesBaseName", "${ProjectSetting.NAME_APK}(${versionName})") | ||
|
||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
|
||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
} | ||
|
||
packagingOptions { | ||
exclude("META-INF/AL2.0") | ||
exclude("META-INF/LGPL2.1") | ||
} | ||
|
||
} | ||
|
||
|
||
dependencies { | ||
|
||
implementation("org.jetbrains.kotlin:kotlin-stdlib:${Dependency.KOTLIN_VERSION}") | ||
implementation("androidx.core:core-ktx:1.7.0") | ||
implementation("androidx.appcompat:appcompat:1.4.0") | ||
implementation("com.google.android.material:material:1.4.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.2") | ||
|
||
// Library FrogoLog | ||
implementation(project(":frogolog")) | ||
|
||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.3") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
buildscript { | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath("com.android.tools.build:gradle:7.0.4") | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Dependency.KOTLIN_VERSION}") | ||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
|
||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
tasks.register("clean", Delete::class) { | ||
delete(rootProject.buildDir) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
.gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import org.gradle.kotlin.dsl.`kotlin-dsl` | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Created by faisalamir on 19/09/21 | ||
* FrogoRecyclerView | ||
* ----------------------------------------- | ||
* Name : Muhammad Faisal Amir | ||
* E-mail : [email protected] | ||
* Github : github.com/amirisback | ||
* ----------------------------------------- | ||
* Copyright (C) 2021 FrogoBox Inc. | ||
* All rights reserved | ||
* | ||
*/ | ||
|
||
object Dependency { | ||
|
||
// dependencies version | ||
const val KOTLIN_VERSION = "1.6.10" | ||
const val COMPOSE_VERSION = "1.0.2" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Created by faisalamir on 19/09/21 | ||
* FrogoRecyclerView | ||
* ----------------------------------------- | ||
* Name : Muhammad Faisal Amir | ||
* E-mail : [email protected] | ||
* Github : github.com/amirisback | ||
* ----------------------------------------- | ||
* Copyright (C) 2021 FrogoBox Inc. | ||
* All rights reserved | ||
* | ||
*/ | ||
|
||
object ProjectSetting { | ||
|
||
// project settings | ||
const val NAME_APP = "Frogo Log" | ||
val NAME_APK = NAME_APP.toLowerCase().replace(" ", "-") | ||
|
||
const val APP_DOMAIN = "com" | ||
const val APP_PLAY_CONSOLE = "frogobox" | ||
const val APP_NAME = "applog" | ||
|
||
const val LIBRARY_NAME = "frogolog" | ||
|
||
const val VERSION_MAJOR = 2 | ||
const val VERSION_MINOR = 0 | ||
const val VERSION_PATCH = 4 | ||
|
||
const val PROJECT_COMPILE_SDK = 31 | ||
const val PROJECT_MIN_SDK = 21 | ||
const val PROJECT_TARGET_SDK = PROJECT_COMPILE_SDK | ||
|
||
const val PROJECT_APP_ID = "$APP_DOMAIN.$APP_PLAY_CONSOLE.$APP_NAME" | ||
const val PROJECT_LIB_ID = "$APP_DOMAIN.$APP_PLAY_CONSOLE.$LIBRARY_NAME" | ||
const val PROJECT_VERSION_CODE = (VERSION_MAJOR * 100) + (VERSION_MINOR * 10) + (VERSION_PATCH * 1) | ||
const val PROJECT_VERSION_NAME = "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.