plugins {
	id 'com.android.application'
}

android {
	compileSdk 33
	defaultConfig {
		archivesBaseName = "moshidon"
		applicationId "org.joinmastodon.android.moshinda"
		minSdk 23
		targetSdk 33
		versionCode 99
		versionName "1.2.0+fork.99.moshinda"
		testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
		resConfigs "ar-rSA", "be-rBY", "bn-rBD", "bs-rBA", "ca-rES", "cs-rCZ", "de-rDE", "el-rGR", "es-rES", "eu-rES", "fi-rFI", "fil-rPH", "fr-rFR", "ga-rIE", "gd-rGB", "gl-rES", "hi-rIN", "hr-rHR", "hu-rHU", "hy-rAM", "in-rID", "is-rIS", "it-rIT", "iw-rIL", "ja-rJP", "kab", "ko-rKR", "nl-rNL", "oc-rFR", "pl-rPL", "pt-rBR", "pt-rPT", "ro-rRO", "ru-rRU", "si-rLK", "sl-rSI", "sv-rSE", "th-rTH", "tr-rTR", "uk-rUA", "vi-rVN", "zh-rCN", "zh-rTW"
	}

	signingConfigs {
		nightly{
			storeFile = file("keystore/nightly_keystore.jks")
			storePassword System.getenv("SIGNING_STORE_PASSWORD")
			keyAlias System.getenv("SIGNING_KEY_ALIAS")
			keyPassword System.getenv("SIGNING_KEY_PASSWORD")
		}
	}

	buildTypes {
		release {
//			minifyEnabled true
//			shrinkResources true
			proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
		}
		debug{
			debuggable true
			versionNameSuffix '-debug'
			applicationIdSuffix '.debug'
		}
		githubRelease{
			initWith release
		}
		nightly{
			initWith release
			versionNameSuffix '-nightly'
			applicationIdSuffix '.nightly'
			signingConfig signingConfigs.nightly
		}
		playRelease{
			initWith release
			minifyEnabled true
			shrinkResources true
			versionNameSuffix '-play'
		}
	}
	compileOptions {
		sourceCompatibility JavaVersion.VERSION_17
		targetCompatibility JavaVersion.VERSION_17
		coreLibraryDesugaringEnabled true
	}
	sourceSets{
		githubRelease{
			setRoot "src/github"
		}
		debug {
			setRoot "src/github"
		}
	}
	lintOptions{
		checkReleaseBuilds false
		abortOnError false
	}
}

dependencies {
	api 'androidx.annotation:annotation:1.3.0'
	implementation 'com.squareup.okhttp3:okhttp:3.14.9'
	implementation 'me.grishka.litex:recyclerview:1.2.1.1'
	implementation 'me.grishka.litex:swiperefreshlayout:1.1.0.1'
	implementation 'me.grishka.litex:browser:1.4.0'
	implementation 'me.grishka.litex:dynamicanimation:1.1.0-alpha03'
	implementation 'me.grishka.litex:viewpager:1.0.0'
	implementation 'me.grishka.litex:viewpager2:1.0.0'
	implementation 'me.grishka.appkit:appkit:1.2.7'
	implementation 'com.google.code.gson:gson:2.8.9'
	implementation 'org.jsoup:jsoup:1.14.3'
	implementation 'com.squareup:otto:1.3.8'
	implementation 'de.psdev:async-otto:1.0.3'
	implementation 'org.parceler:parceler-api:1.1.12'
	implementation 'com.github.bottom-software-foundation:bottom-java:2.1.0'
	annotationProcessor 'org.parceler:parceler:1.1.12'
	coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

	androidTestImplementation 'androidx.test:core:1.4.1-alpha05'
	androidTestImplementation 'androidx.test.ext:junit:1.1.4-alpha05'
	androidTestImplementation 'androidx.test:runner:1.5.0-alpha02'
	androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha05'
}
