Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions build.gradle

This file was deleted.

23 changes: 23 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
dependencies {
classpath(libs.gradle)
classpath(kotlin("gradle-plugin", version = libs.versions.kotlin.get()))

classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${libs.versions.navigation.get()}")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.ksp) apply false
}

project.tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
122 changes: 0 additions & 122 deletions core/build.gradle

This file was deleted.

122 changes: 122 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
plugins {
kotlin("android")
kotlin("kapt")
`maven-publish`

id("com.android.library")
id("com.google.devtools.ksp")
}

android {
compileSdk = 34

defaultConfig {
minSdk = 21

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

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

buildFeatures {
dataBinding = true
viewBinding = true
}

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

kotlinOptions {
jvmTarget = "17"
}

namespace = "be.appwise.core"
}

dependencies {
implementation(libs.startup.runtime)

testImplementation(libs.mockk)
testImplementation(libs.junit)
androidTestImplementation(libs.junit.ext)
androidTestImplementation(libs.test.runner)
androidTestImplementation(libs.espresso.core)
api(libs.core.ktx)

api(libs.multidex)

//Kotlin reflect
api(libs.kotlin.reflect)

//ViewModel
api(libs.lifecycle.viewmodel.ktx)

api(libs.lifecycle.livedata.ktx)

//AndroidX Support libraries
api(libs.appcompat)
api(libs.material)
api(libs.constraintlayout)
api(libs.swiperefreshlayout)

//coroutines
api(libs.kotlinx.coroutines.core)
api(libs.kotlinx.coroutines.android)

// navigation components
api(libs.navigation.fragment.ktx)
api(libs.navigation.ui.ktx)

// gson (https://github.com/google/gson)
api(libs.gson)

// logger (https://github.com/orhanobut/logger)
api(libs.logger)

// Hawk (https://github.com/orhanobut/hawk)
api(libs.hawk)

//open image chooser
api(libs.easyimage)

//image loading/caching
api(libs.glide.glide)
ksp(libs.glide.compiler)

//dialogs
api(libs.material.dialogs.core)
api(libs.material.dialogs.datetime)

// Time manipulation for Java 7
api(libs.joda.time)

// https://github.com/Ereza/CustomActivityOnCrash
implementation(libs.customactivityoncrash)
}

val sourceJar: Task by tasks.creating(Jar::class) {
from(android.sourceSets["main"].java.srcDirs)
// classifier("sources")
}

afterEvaluate {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe an idea to move this to a separate file and include it where it is necessary?
This could also be done with the submodules configuration with a filter on the specific module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this but it could not get it to work. I tried extracting it into an other publish.gradle.kts file and applying it with apply { from(../publish.gradle.kts) } but the publish.gradle.kts gave several errors regarding unresolved references like groupId etc

publishing {
publications {
create<MavenPublication>("release") {
from(components["release"])

groupId = "com.github.appwise-labs"

artifact(sourceJar)
}
}
}
}
2 changes: 1 addition & 1 deletion core/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
Loading