Skip to content

Commit

Permalink
使用阿里云repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hui.zhao committed Feb 29, 2020
1 parent 82c0fea commit cb7d020
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ static MethodsRecordInfo convertToMethodsRecordInfo(long startTimeNanos, long st
List<MethodsRecordInfo.MethodInfoOfThreadInfo.MethodInfo> methodInfos = new ArrayList<>(methodEvents.size());
Stack<MethodsRecordInfo.MethodInfoOfThreadInfo.MethodInfo> methodEventsStackOfCurrentThread = new Stack<>();
for (MethodEvent methodEvent : methodEvents) {
// TODO KYSON 修改为type
if (methodEvent instanceof MethodEnterEvent) {
MethodsRecordInfo.MethodInfoOfThreadInfo.MethodInfo methodInfo = new MethodsRecordInfo.MethodInfoOfThreadInfo.MethodInfo();
methodInfo.className = methodEvent.className;
Expand Down
42 changes: 24 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

buildscript {
repositories {
google()
jcenter()
mavenCentral()
// // Replacement of google()
// maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
// // Replacement of mavenCentral()
// maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// // Replacement of jcenter()
// maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
if (Boolean.parseBoolean(USE_ALIYUN_REPO)) {
// Replacement of google()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
// Replacement of mavenCentral()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// Replacement of jcenter()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
} else {
google()
jcenter()
mavenCentral()
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
Expand All @@ -22,15 +25,18 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
mavenCentral()
// // Replacement of google()
// maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
// // Replacement of mavenCentral()
// maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// // Replacement of jcenter()
// maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
if (Boolean.parseBoolean(USE_ALIYUN_REPO)) {
// Replacement of google()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
// Replacement of mavenCentral()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
// Replacement of jcenter()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
} else {
google()
jcenter()
mavenCentral()
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ android.enableJetifier=true
COMPILE_SDK_VERSION=29
BUILD_TOOLS_VERSION=29.0.2
MIN_SDK_VERSION=16
TARGET_SDK_VERSION=29
TARGET_SDK_VERSION=29

USE_ALIYUN_REPO=false

0 comments on commit cb7d020

Please sign in to comment.