plugins {
	alias(libs.plugins.androidLibrary)
	alias(libs.plugins.kotlin.android)
}

android {
	namespace = "com.zaneschepke.logcatter"
	compileSdk = Constants.TARGET_SDK

	defaultConfig {
		minSdk = Constants.MIN_SDK

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

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

		create(Constants.PRERELEASE) {
			initWith(getByName(Constants.RELEASE))
		}

		create(Constants.NIGHTLY) {
			initWith(getByName(Constants.RELEASE))
		}
	}
	compileOptions {
		sourceCompatibility = JavaVersion.VERSION_17
		targetCompatibility = JavaVersion.VERSION_17
	}
	kotlinOptions {
		jvmTarget = Constants.JVM_TARGET
	}
}

dependencies {

	implementation(libs.androidx.core.ktx)
	implementation(libs.androidx.appcompat)
	implementation(libs.material)
	testImplementation(libs.junit)
	androidTestImplementation(libs.androidx.junit)
	androidTestImplementation(libs.androidx.espresso.core)

	implementation(libs.androidx.lifecycle.process)
	// logging
	implementation(libs.timber)
}
