plugins {
	id 'com.android.library'
	id 'kotlin-android'
	id 'kotlin-android-extensions'
	id 'kotlin-kapt'
	id 'com.novoda.bintray-release'
}

publish {
	bintrayUser = rootProject.ext.publish_user_org
	bintrayKey = rootProject.ext.publish_bintray_key
	uploadName = rootProject.ext.banner_package_name
	userOrg = rootProject.ext.publish_user_org
	groupId = rootProject.ext.publish_group_id
	artifactId = rootProject.ext.banner_artifact_id
	publishVersion = rootProject.ext.banner_version_name
	desc = rootProject.ext.banner_artifact_id
	website = rootProject.ext.website + rootProject.ext.banner_artifact_id
	dryRun = false
}

android {
	compileSdkVersion rootProject.ext.compile_sdk_version
	defaultConfig {
		minSdkVersion rootProject.ext.min_sdk_version
		versionCode rootProject.ext.banner_version_code
		versionName rootProject.ext.banner_version_name
		kapt {
			arguments {
				arg('eventBusIndex', 'com.djangoogle.banner.BannerEventBusIndex')
			}
		}
	}
	compileOptions {
		sourceCompatibility rootProject.ext.java_version
		targetCompatibility rootProject.ext.java_version
	}
}

dependencies {
	//https://www.kotlincn.net/docs/reference/using-gradle.html
	implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
	implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
	//https://maven.google.com
	compileOnly "com.google.android.material:material:$androidx_material_version"
	compileOnly "androidx.constraintlayout:constraintlayout:$androidx_constraintlayout_version"
	//https://github.com/bumptech/glide
	compileOnly "com.github.bumptech.glide:glide:$glide_version"
	//https://github.com/greenrobot/EventBus
	compileOnly "org.greenrobot:eventbus:$event_bus_version"
	//http://greenrobot.org/eventbus/documentation/subscriber-index
	kapt "org.greenrobot:eventbus-annotation-processor:$event_bus_version"
	//https://github.com/ReactiveX/RxAndroid
	compileOnly "io.reactivex.rxjava2:rxandroid:$rx_android_version"
	//https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/README-CN.md
	compileOnly "com.blankj:utilcodex:$util_codex_version"
	//https://github.com/CymChad/BaseRecyclerViewAdapterHelper
	api "com.github.CymChad:BaseRecyclerViewAdapterHelper:$base_recyclerview_adapter_helper_version"
	//https://github.com/wseemann/FFmpegMediaMetadataRetriever
	implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'
}
