Skip to content

Commit cdfc42f

Browse files
committed
Remove jcenter/bintray dependence and add support for maven central
1 parent 1814ff9 commit cdfc42f

File tree

21 files changed

+250
-177
lines changed

21 files changed

+250
-177
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_module_common.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* File: 'android_module_common.gradle'
33
* Location: https://raw.githubusercontent.com/yongce/AndroidLib/master/android_module_common.gradle
4-
* Version: 2020.03.26
4+
* Version: 2021.10.1
55
* All android projects can copy and include this file.
66
*/
77

android_project_common.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* File: 'android_project_common.gradle'
33
* Location: https://raw.githubusercontent.com/yongce/AndroidLib/master/android_project_common.gradle
4-
* Version: 2020.08.22
4+
* Version: 2021.10.1
55
* All android projects can copy and include this file.
66
*/
77

@@ -35,7 +35,7 @@ ext {
3535

3636
versions = [
3737
// compile
38-
'compileSdk' : 30,
38+
'compileSdk' : 31,
3939

4040
// Android official support
4141
'kotlin' : '1.5.31',
@@ -91,7 +91,7 @@ ext {
9191
'okhttp' : '4.9.0',
9292
'retrofit' : '2.9.0',
9393
'glide' : '4.11.0',
94-
'glideTrans' : "4.0.0",
94+
'glideTrans' : "4.3.0",
9595

9696
// rx
9797
'rxjava' : "2.2.12",
@@ -276,7 +276,7 @@ ext {
276276
'glideTrans' : "jp.wasabeef:glide-transformations:${versions.glideTrans}",
277277

278278
// UI
279-
'flexbox' : "com.google.android:flexbox:2.0.1",
279+
'flexbox' : "com.google.android.flexbox:flexbox:3.0.0",
280280
'lottie' : "com.airbnb.android:lottie:3.4.4",
281281

282282
// rx
@@ -287,10 +287,10 @@ ext {
287287

288288
// ycdev
289289
'ycdev': [
290-
'androidBase' : "me.ycdev.android:common-base:${versions.androidLib}",
291-
'androidArch' : "me.ycdev.android:common-arch:${versions.androidLib}",
292-
'androidUi' : "me.ycdev.android:common-ui:${versions.androidLib}",
293-
'androidTest' : "me.ycdev.android:common-test:${versions.androidLib}"
290+
'androidBase' : "io.github.yongce:android-common-base:${versions.androidLib}",
291+
'androidArch' : "io.github.yongce:android-common-arch:${versions.androidLib}",
292+
'androidUi' : "io.github.yongce:android-common-ui:${versions.androidLib}",
293+
'androidTest' : "io.github.yongce:android-common-test:${versions.androidLib}"
294294
],
295295

296296
// others

archLintRulesTestDemo/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77
defaultConfig {
88
applicationId "me.ycdev.android.arch.demo"
99
minSdkVersion versions.minSdk
10-
targetSdkVersion 30
10+
targetSdkVersion 31
1111
versionCode 1
1212
versionName "1.0"
1313

@@ -97,7 +97,7 @@ dependencies {
9797
implementation "io.reactivex.rxjava2:rxandroid:${versions.rxandroid}"
9898

9999
implementation "com.google.zxing:core:${versions.zxing}"
100-
implementation "com.google.android:flexbox:2.0.1"
100+
implementation "com.google.android.flexbox:flexbox:3.0.0"
101101
implementation "com.airbnb.android:lottie:3.4.4"
102102

103103
testImplementation "androidx.test:core:${versions.testCore}"

archLintRulesTestDemo/src/main/AndroidManifest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="me.ycdev.android.arch.demo" >
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="me.ycdev.android.arch.demo">
45

56
<application
67
android:allowBackup="true"
78
android:icon="@mipmap/ic_launcher"
89
android:label="@string/app_name"
9-
android:theme="@style/AppTheme" >
10+
android:theme="@style/AppTheme"
11+
tools:ignore="MediaCapabilities">
1012
<activity
1113
android:name=".activity.LintGoodActivity"
1214
android:label="@string/title_activity_lint_good"

baseLib/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
33
apply from: "${androidModuleCommon}"
44
apply from: '../build_common.gradle'
55

6-
project.archivesBaseName = 'common-base'
6+
project.archivesBaseName = 'android-common-base'
77

88
android {
99
defaultConfig {
@@ -47,7 +47,6 @@ project.ext {
4747
moduleDesc = 'Common basic module in AndroidLib project'
4848
}
4949

50-
if (bintrayUploadEnabled) {
51-
apply from: rootProject.file('bintray-install.gradle')
52-
apply from: rootProject.file('bintray-upload.gradle')
50+
if (publishEnabled) {
51+
apply from: rootProject.file('publish-module.gradle')
5352
}

baseLib/src/main/java/me/ycdev/android/lib/common/activity/ActivityTaskTracker.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package me.ycdev.android.lib.common.activity
22

3+
import android.annotation.SuppressLint
34
import android.app.Activity
45
import android.app.Application
56
import android.os.Bundle
@@ -12,6 +13,7 @@ import java.util.concurrent.atomic.AtomicInteger
1213
* This class can be used to track Activity/task state changes.
1314
* We can use it in instrumentation test cases to check Activity/task related design/logic.
1415
*/
16+
@SuppressLint("StaticFieldLeak")
1517
object ActivityTaskTracker {
1618
private const val TAG = "ActivityTaskTracker"
1719

@@ -27,6 +29,7 @@ object ActivityTaskTracker {
2729
private var totalActivitiesCount = AtomicInteger(0)
2830

2931
private var focusedTaskId: Int = -1
32+
@SuppressLint("StaticFieldLeak")
3033
private var resumedActivity: Activity? = null
3134

3235
private var debugLog: Boolean = false

baseLib/src/main/java/me/ycdev/android/lib/common/ipc/ServiceConnector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ abstract class ServiceConnector<IServiceInterface> protected constructor(
309309
private const val MSG_CONNECT_TIMEOUT_CHECK = 3
310310

311311
private const val CONNECT_TIMEOUT_CHECK_INTERVAL: Long = 5000 // 5s
312-
private const val FORCE_REBIND_TIME: Long = 30 * 1000 // 30 seconds
312+
private const val FORCE_REBIND_TIME: Long = 30 * 1000L // 30 seconds
313313

314314
fun strConnectState(state: Int): String {
315315
return when (state) {

bintray-install.gradle

Lines changed: 0 additions & 66 deletions
This file was deleted.

bintray-upload.gradle

Lines changed: 0 additions & 64 deletions
This file was deleted.

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,41 @@ buildscript {
77

88
repositories {
99
google()
10-
jcenter()
10+
mavenCentral()
1111
}
1212

1313
dependencies {
1414
classpath 'com.android.tools.build:gradle:7.0.2'
1515
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
16-
17-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
18-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1916
}
2017
}
2118

22-
// Add plugin for 'spotless'
2319
plugins {
24-
id "com.diffplug.spotless" version "5.11.0"
20+
id("com.diffplug.spotless") version "5.11.0"
21+
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
22+
id("org.jetbrains.dokka") version "1.5.30"
2523
}
2624

2725
allprojects {
2826
repositories {
2927
google()
30-
jcenter()
28+
mavenCentral()
3129
}
3230
}
3331

3432
ext {
3533
versions.ndkVersion = "21.3.6528147"
3634

37-
bintrayUploadEnabled = true
38-
bintrayMaven = [
39-
'projectRepo': 'android',
35+
publishEnabled = true
36+
mavenMeta = [
37+
'name': 'AndroidLib',
38+
'description': 'Android libraries',
4039
'projectUrl': 'https://github.com/yongce/AndroidLib',
4140
'projectScmConnection': 'https://github.com/yongce/AndroidLib.git',
4241
'projectScmDevConnection': 'ssh://[email protected]/yongce/AndroidLib.git',
4342
'projectInceptionYear': '2013',
44-
'groupId': 'me.ycdev.android',
45-
'version': '1.8.5',
43+
'groupId': 'io.github.yongce',
44+
'version': '2.0.0',
4645
'developerId': 'yongce',
4746
'developerName': 'Yongce Tu',
4847
'developerEmail': '[email protected]',
@@ -64,4 +63,5 @@ spotless {
6463
}
6564
}
6665

66+
apply from: "${rootDir}/publish-root.gradle"
6767
apply plugin: 'android-reporting'

0 commit comments

Comments
 (0)