Skip to content

Commit

Permalink
update gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcns committed Nov 7, 2022
1 parent eb6b6ac commit 08bd9a9
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 2 deletions.
74 changes: 73 additions & 1 deletion arcns-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,79 @@
//ext.module_group = "com.github.Arcns.arcnslibrary"
////ext.module_name = "arcns-core"
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'
group = 'com.github.Arcns'
// 引入jcenter仓库
//apply plugin: 'com.novoda.bintray-release'

apply from: rootProject.file("library_config.gradle")
android {
namespace 'com.arcns.core'
compileSdkVersion versions.compile_sdk
buildToolsVersion versions.build_tools

defaultConfig {
minSdkVersion versions.min_sdk
targetSdkVersion versions.compile_sdk
versionCode versions.publish_code
versionName versions.publish_name

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
ndk {
//设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

dataBinding {
// 启用databinding,与kotlin一起使用时,必须引入:apply plugin: 'kotlin-kapt'
enabled = true
}

sourceSets {
main {
jniLibs.srcDir 'libs'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
}
}
}
}

// jcenter仓库配置
//publish {
// userOrg = 'xinyangzaikongzhongpiaoyang' //bintray注册的用户名(不是邮箱)
// groupId = module_group
// artifactId = module_name //项目名称
// publishVersion = versions.publish_name //版本号
// desc = 'https://github.com/Arcns/arcnslibrary' //项目描述。可空。
// website = 'https://github.com/Arcns/arcnslibrary' //项目地址,通常填github地址。可空。
//}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
Expand Down
1 change: 0 additions & 1 deletion library_config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ group = 'com.github.Arcns'
//apply plugin: 'com.novoda.bintray-release'

android {
namespace project.name
compileSdkVersion versions.compile_sdk
buildToolsVersion versions.build_tools

Expand Down

0 comments on commit 08bd9a9

Please sign in to comment.