plugins { id 'com.android.library' id 'com.google.protobuf' // id 'maven' } ext { //自动驾驶产品版本号 AP_VERSION = "2.2.1" } android { compileSdkVersion rootProject.ext.android.compileSdkVersion // buildToolsVersion rootProject.ext.android.buildToolsVersion defaultConfig { minSdkVersion rootProject.ext.android.minSdkVersion targetSdkVersion rootProject.ext.android.targetSdkVersion versionCode Integer.valueOf(VERSION_CODE) def name = getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") versionName name // buildConfigField "String", "VERSION_NAME", "\"${name}\"" buildConfigField "String", "AP_VERSION", "\"${AP_VERSION}\"" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } sourceSets { main { java { srcDir 'src/main/java' } proto { srcDir 'src/main/proto' include '**/*.proto' } } } protobuf { protoc { artifact = 'com.google.protobuf:protoc:3.6.1' } generateProtoTasks { all().each { task -> task.builtins { remove java } task.builtins { java {} } } } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation rootProject.ext.dependencies.mogochainbase //okhttp3的依赖 implementation 'com.squareup.okhttp3:okhttp:3.12.3' // parser implementation rootProject.ext.dependencies.gson // logger //implementation 'com.orhanobut:logger:2.2.0' //ProtoBuf implementation 'com.google.protobuf:protobuf-java:3.6.1' implementation 'com.google.protobuf:protoc:3.6.1' implementation 'com.google.protobuf:protobuf-java-util:3.6.1' implementation 'com.jcraft:jsch:0.1.55' // api project(path: ':lib_recorder') api "com.zhidao.support.recorder:recorder:1.0.0.3" if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { implementation rootProject.ext.dependencies.mogo_core_data } else { implementation project(':core:mogo-core-data') } } //task androidSourcesJar(type: Jar) { // classifier = 'sources' // from android.sourceSets.main.java.srcDirs //} ////配置需要上传到maven仓库的文件 //artifacts { // archives androidSourcesJar //} // //uploadArchives { // repositories.mavenDeployer { // repository(url: RELEASE_REPO_URL) { // authentication(userName: NAME, password: PASSWORD) // } // snapshotRepository(url: SNAPSHOT_REPOSITORY_URL) { // authentication(userName: NAME, password: PASSWORD) // } // pom.groupId = GROUP // pom.artifactId = POM_ARTIFACT_ID // pom.version = VERSION // } //}