123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- /*
- * ********************************************************************************************************************
- *
- * iFHS7.
- * ;BBMBMBMc rZMBMBR BMB
- * MBEr:;PBM, 7MBMMEOBB: BBB RBW
- * XK: BO SB. :SZ MBM. c;; ir BBM :FFr :SSF: ;xBMB:r iuGXv. i:. iF2;
- * DBBM0r. :D S7 ;XMBMB GMBMu. MBM: BMB MBMBBBMBMS WMBMBMBBK MBMBMBM BMBRBMBW .MBMBMBMBB
- * :JMRMMD .. , 1MMRM1; ;MBMBBR: MBM ;MB: BMB: MBM. RMBr sBMH BM0 UMB, BMB. KMBv
- * ;. XOW B1; :uM: 1RE, i .2BMBs rMB. MBO MBO JMB; MBB MBM BBS 7MBMBOBM: MBW :BMc
- * OBRJ.SEE MRDOWOR, 3DE:7OBM . ;BMB RMR7BM BMB MBB. BMB ,BMR .BBZ MMB rMB, BMM rMB7
- * :FBRO0D0 RKXSXPR. JOKOOMPi BMBSSWBMB; BMBB: MBMB0ZMBMS .BMBOXRBMB MBMDE RBM2;SMBM; MBB xBM2
- * iZGE O0SHSPO. uGZ7. sBMBMBDL :BMO OZu:BMBK, rRBMB0; ,EBMB xBMBr:ER. RDU :OO;
- * ,BZ, 1D0 RPSFHXR. xWZ .SMr . .BBB
- * :0BMRDG RESSSKR. 2WOMBW; BMBMR
- * i0BM: SWKHKGO MBDv
- * .UB OOGDM. MK, Copyright (c) 2015-2019. 斯伯坦机器人
- * , XMW ..
- * r All rights reserved.
- *
- * ********************************************************************************************************************
- */
- group rootProject.group
- version rootProject.version
- apply plugin: 'com.android.library'
- apply plugin: 'kotlin-android'
- apply plugin: 'kotlin-android-extensions'
- apply plugin: 'org.jetbrains.dokka-android'
- apply plugin: 'maven'
- android {
- compileSdkVersion ANDROID_SDK_VERSION.toInteger()
- buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
- defaultConfig {
- minSdkVersion ANDROID_MIN_SDK_VERSION.toInteger()
- targetSdkVersion ANDROID_SDK_VERSION.toInteger()
- versionCode SAGA_CODE.toInteger()
- versionName SAGA_ANDROID_VERSION
- testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
- }
- buildTypes {
- release {
- proguardFile 'proguard-rules.pro'
- }
- }
- // 解决lint语法检查错误(kotlin语法无法通过lint)
- lintOptions {
- abortOnError false
- }
- kotlinOptions {
- jvmTarget = JVM_TARGET
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // kotlin 依赖
- // https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8
- implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // android支持
- implementation group: 'com.android.support', name: 'appcompat-v7', version: ANDROID_SUPPORT_VERSION
- implementation group: 'com.android.support', name: 'design', version: ANDROID_SUPPORT_VERSION
- // implementation group: 'com.android.support', name: 'support-v4', version: ANDROID_SUPPORT_VERSION
- implementation group: 'com.android.support.constraint', name: 'constraint-layout', version: CONSTRAINT_VERSION
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // anko依赖
- // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-common
- implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION
- // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-sdk25
- implementation group: 'org.jetbrains.anko', name: 'anko-sdk25', version: ANKO_VERSION
- // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-design
- implementation group: 'org.jetbrains.anko', name: 'anko-design', version: ANKO_VERSION
- // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-appcompat-v7
- implementation group: 'org.jetbrains.anko', name: 'anko-appcompat-v7', version: ANKO_VERSION
- // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-support-v4
- implementation group: 'org.jetbrains.anko', name: 'anko-support-v4', version: ANKO_VERSION
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 二维码与条形码
- // https://mvnrepository.com/artifact/com.google.zxing/core
- implementation group: 'com.google.zxing', name: 'core', version: ZXING_VERSION
- // https://mvnrepository.com/artifact/com.google.zxing/android-core
- implementation 'com.android.support.constraint:constraint-layout:1.1.3'
- implementation group: 'com.google.zxing', name: 'android-core', version: ZXING_VERSION
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // SAGA依赖
- implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
- implementation project(':sybotan-android-base')
- implementation project(':sybotan-android-views')
- }
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 文档生成
- // 源码
- task sourcesJar(type: Jar) {
- group = 'jar'
- from "${android.sourceSets.main.java.srcDirs}"
- classifier = 'sources'
- }
- // 文档
- task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
- jdkVersion = JDK_VERSION.toInteger()
- noStdlibLink = true
- outputFormat = 'javadoc'
- outputDirectory = "$buildDir/javadoc"
- // sourceDirs = files('src/main/java')
- }
- // 上成上传的文档jar包
- task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
- group = 'jar'
- classifier = 'javadoc'
- from "${dokka.outputDirectory}"
- }
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // maven 仓库管理
- // 设置上传的包,默认上传aar与pom
- artifacts {
- // 上传源码包
- // archives sourcesJar
- // 上传文档包
- // archives javadocJar
- }
- uploadArchives {
- repositories {
- mavenDeployer {
- pom.groupId = project.group
- pom.version = project.version
- pom.artifactId = project.name
- pom.project {
- name project.name
- packaging 'jar'
- url SAGA_URL
- description '斯伯坦机器人世界 android works组件库。'
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
- developers {
- developer {
- id DEVELOPER_ID
- name DEVELOPER_NAME
- }
- }
- }
- snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
- authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
- }
- repository(url: MAVEN_REPO_RELEASE_URL) {
- authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
- }
- }
- }
- }
|