Skip to content

Commit 259a26a

Browse files
author
zhongcang
committed
Merge branch 'dev'
2 parents c58302b + a6a7616 commit 259a26a

File tree

269 files changed

+8585
-25391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

269 files changed

+8585
-25391
lines changed

atlas-core/build.gradle

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
4-
apply from: 'http://gitlab.alibaba-inc.com/android-build-system/buildscript/raw/master/mtl-publish.gradle'
4+
apply from: 'http://gitlab.alibaba-inc.com/android-build-system/buildscript/raw/master/mtl-publish.gradle'
5+
6+
7+
def mini = getEnvValue("mini", 'false')
8+
def commitTag = getEnvValue("commitTag", 'false')
59

610
buildscript {
711

@@ -23,7 +27,20 @@ repositories {
2327

2428
group = 'com.taobao.android'
2529
description = """atlas_core"""
26-
version '5.0.7.30'
30+
String postFix = mini=='true' ? "-mini" : "";
31+
version "5.0.7.52${postFix}-SNAPSHOT"
32+
33+
String getEnvValue(key, defValue) {
34+
def val = System.getProperty(key);
35+
if (null != val) {
36+
return val;
37+
}
38+
val = System.getenv(key);
39+
if (null != val) {
40+
return val;
41+
}
42+
return defValue;
43+
}
2744

2845

2946
sourceCompatibility = 1.7
@@ -55,12 +72,52 @@ tasks.whenTaskAdded {task ->
5572
new File(task.getDestinationDir(),"android/databinding/DataBindingComponent.class").delete();
5673
new File(task.getDestinationDir(),"android/databinding/ViewDataBinding.class").delete();
5774
new File(task.getDestinationDir(),"android/taobao/atlas/framework/FrameworkProperties.class").delete();
75+
new File(task.getDestinationDir(),"android/taobao/atlas/bundleInfo/AtlasBundleInfoGenerator.class").delete();
76+
}
77+
} else if(task.name.equals('mergeReleaseJniLibFolders')){
78+
task.doLast {
79+
if(mini=='true') {
80+
new File(project.buildDir, "intermediates/jniLibs/release/armeabi-v7a").deleteDir()
81+
new File(project.buildDir, "intermediates/jniLibs/release/mips64").deleteDir()
82+
new File(project.buildDir, "intermediates/jniLibs/release/arm64-v8a").deleteDir()
83+
new File(project.buildDir, "intermediates/jniLibs/release/mips").deleteDir()
84+
new File(project.buildDir, "intermediates/jniLibs/release/x86").deleteDir()
85+
new File(project.buildDir, "intermediates/jniLibs/release/x86_64").deleteDir()
86+
}
87+
5888
}
5989
}
90+
91+
// if(task.name == "bintrayUpload"){
92+
// task.doFirst{
93+
// println "tag has been created!"
94+
// }
95+
//
96+
// task.doLast {
97+
// String newTag = "v${version}"
98+
// println "new Tag is ${newTag}"
99+
// "git tag v${version}".execute()
100+
// "git push origin v${version}".execute()
101+
// println "tag v${version} has been created!"
102+
// }
103+
// }
104+
105+
}
106+
107+
108+
project.gradle.buildFinished{
109+
if(commitTag=='true') {
110+
"git tag v${version}".execute()
111+
"git push origin v${version}".execute()
112+
"git push origin v${version}".execute()
113+
println "tag v${version} has been created!"
114+
}
60115
}
61116

62117

63118

119+
120+
64121
android {
65122
compileSdkVersion 23
66123
buildToolsVersion '23.0.1'
@@ -74,6 +131,8 @@ android {
74131
}
75132
}
76133

134+
135+
77136
defaultConfig {
78137
consumerProguardFiles 'proguard.cfg'
79138
}
@@ -82,6 +141,16 @@ android {
82141
sourceCompatibility JavaVersion.VERSION_1_7
83142
targetCompatibility JavaVersion.VERSION_1_7
84143
}
144+
145+
buildTypes {
146+
release {
147+
if(mini=='true') {
148+
minifyEnabled true
149+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
150+
}
151+
}
152+
}
153+
85154
}
86155
def siteUrl = 'https://github.com/alibaba/atlas'
87156
// 项目的主页

atlas-core/proguard.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
-dontwarn java.awt.**
2+
-dontwarn com.taobao.**
3+
-dontwarn com.google.android.maps.**
4+
-dontwarn android.support.v7.widget.**
5+
-dontwarn android.support.v4.**
6+
-dontwarn android.taobao.atlas.**
7+
-dontwarn android.databinding.**
8+
-dontwarn android.app.**
9+
10+
111
-keep class android.taobao.atlas.bridge.BridgeApplicationDelegate{*;}
212
-keep class android.taobao.atlas.runtime.AtlasPreLauncher{*;}
13+
-keep class com.taobao.android.runtime.**{*;}
314
-keepclassmembers class * implements android.taobao.atlas.runtime.AtlasPreLauncher {
415
public <fields>;
516
public <methods>;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (C) 2011 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package android.content.pm;
18+
19+
import android.os.Binder;
20+
import android.os.IBinder;
21+
import android.os.Parcel;
22+
import android.os.Parcelable;
23+
import android.os.RemoteException;
24+
import android.util.Log;
25+
26+
import java.util.ArrayList;
27+
import java.util.Collections;
28+
import java.util.List;
29+
30+
/**
31+
* Transfer a large list of Parcelable objects across an IPC. Splits into
32+
* multiple transactions if needed.
33+
*
34+
* Caveat: for efficiency and security, all elements must be the same concrete type.
35+
* In order to avoid writing the class name of each object, we must ensure that
36+
* each object is the same type, or else unparceling then reparceling the data may yield
37+
* a different result if the class name encoded in the Parcelable is a Base type.
38+
* See b/17671747.
39+
*
40+
* @hide
41+
*/
42+
public class ParceledListSlice<T extends Parcelable> {
43+
private static String TAG = "ParceledListSlice";
44+
private static boolean DEBUG = false;
45+
46+
/*
47+
* TODO get this number from somewhere else. For now set it to a quarter of
48+
* the 1MB limit.
49+
*/
50+
51+
52+
public static <T extends Parcelable> ParceledListSlice<T> emptyList() {
53+
return new ParceledListSlice<T>(Collections.<T> emptyList());
54+
}
55+
56+
public ParceledListSlice(List<T> list) {
57+
}
58+
59+
@SuppressWarnings("unchecked")
60+
private ParceledListSlice(Parcel p, ClassLoader loader) {
61+
62+
}
63+
64+
private static void verifySameType(final Class<?> expected, final Class<?> actual) {
65+
if (!actual.equals(expected)) {
66+
throw new IllegalArgumentException("Can't unparcel type "
67+
+ actual.getName() + " in list of type "
68+
+ expected.getName());
69+
}
70+
}
71+
72+
public List<T> getList() {
73+
return null;
74+
}
75+
76+
77+
78+
79+
}

0 commit comments

Comments
 (0)