2015-12-10 09:05:54 +00:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
|
|
group = 'com.felhr.usbserial'
|
|
|
|
version = '1.0.0'
|
|
|
|
|
|
|
|
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
encoding "UTF-8"
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
|
|
|
|
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
|
|
|
|
}
|
2016-09-23 17:05:35 +00:00
|
|
|
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
2018-01-04 16:26:10 +00:00
|
|
|
task deleteJar(type: org.gradle.api.tasks.Delete) {
|
2016-09-23 17:05:35 +00:00
|
|
|
delete 'eclipse_lib/usbserial.jar'
|
|
|
|
}
|
|
|
|
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
2018-01-04 16:26:10 +00:00
|
|
|
task createJar(type: org.gradle.api.tasks.Copy) {
|
2016-09-23 17:05:35 +00:00
|
|
|
from('build/intermediates/bundles/release/')
|
|
|
|
into('eclipse_lib/')
|
|
|
|
include('classes.jar')
|
|
|
|
rename('classes.jar', 'usbserial.jar')
|
|
|
|
}
|
|
|
|
|
|
|
|
createJar.dependsOn(deleteJar, build)
|
2015-12-10 09:05:54 +00:00
|
|
|
}
|