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 08bd9a9 commit 40e3f96
Show file tree
Hide file tree
Showing 21 changed files with 196 additions and 277 deletions.
5 changes: 1 addition & 4 deletions arcns-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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'

Expand Down Expand Up @@ -78,9 +78,6 @@ afterEvaluate {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.kotlin.stdlib
testImplementation deps.test.junit
androidTestImplementation deps.test.androidx_junit
androidTestImplementation deps.test.androidx_espresso
implementation deps.androidx.appcompat
implementation deps.androidx.ktx
// activity
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.arcns.core.util

import android.annotation.SuppressLint
import android.app.DownloadManager
import android.app.DownloadManager.COLUMN_REASON
import android.app.Service
Expand Down Expand Up @@ -156,6 +157,7 @@ class SimpleDownloadUtil(var context: Context) {
/**
* 通过id获取下载任务状态
*/
@SuppressLint("Range")
fun getDownloadTaskStatusByID(id: Long): SimpleDownloadTaskStatus? {
var cursor = downloadManager.query(DownloadManager.Query().apply {
setFilterById(id)
Expand Down Expand Up @@ -261,6 +263,7 @@ class SimpleDownloadUtil(var context: Context) {
* 下载状态广播接收者
*/
private var downloadCompleteReceiver = object : BroadcastReceiver() {
@SuppressLint("Range")
override fun onReceive(context: Context?, intent: Intent?) {
val currentId = intent?.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, 0) ?: return
var cursor = downloadManager.query(DownloadManager.Query().apply {
Expand Down
17 changes: 0 additions & 17 deletions arcns-core/src/test/java/com/arcns/core/ExampleUnitTest.kt

This file was deleted.

67 changes: 63 additions & 4 deletions arcns-map-baidu/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,73 @@
//ext.module_group = "com.github.Arcns.arcnslibrary"
//ext.module_name = "arcns-map-baidu"
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'

apply from: rootProject.file("library_config.gradle")
// 引入jcenter仓库
//apply plugin: 'com.novoda.bintray-release'

android {
namespace 'com.arcns.map.baidu'
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
}
}
}
}

dependencies {
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.kotlin.stdlib
testImplementation deps.test.junit
androidTestImplementation deps.test.androidx_junit
androidTestImplementation deps.test.androidx_espresso
implementation deps.androidx.appcompat
implementation deps.androidx.ktx
implementation project(path: ':arcns-core')
Expand Down

This file was deleted.

This file was deleted.

69 changes: 64 additions & 5 deletions arcns-map-gaode/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,73 @@
//ext.module_group = "com.github.Arcns.arcnslibrary"
//ext.module_name = "arcns-map-gaode"
//ext.module_name = "arcns-map-baidu"
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'

apply from: rootProject.file("library_config.gradle")
// 引入jcenter仓库
//apply plugin: 'com.novoda.bintray-release'

android {
namespace 'com.arcns.map.gaode'
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
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.kotlin.stdlib
testImplementation deps.test.junit
androidTestImplementation deps.test.androidx_junit
androidTestImplementation deps.test.androidx_espresso
implementation deps.androidx.appcompat
implementation deps.androidx.ktx
implementation project(path: ':arcns-core')
Expand Down

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions arcns-media-audio/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ apply from: rootProject.file("library_config.gradle")
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.kotlin.stdlib
testImplementation deps.test.junit
androidTestImplementation deps.test.androidx_junit
androidTestImplementation deps.test.androidx_espresso
implementation deps.androidx.appcompat
implementation deps.androidx.ktx
implementation project(path: ':arcns-core')
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 40e3f96

Please sign in to comment.