├── .gitignore
├── CityIndex.iml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── channels.txt
├── manifest-merger-channel-release-report.txt
├── proguard-rules.pro
├── src
│ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── tubb
│ │ │ └── cityindex
│ │ │ └── ApplicationTest.java
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── tubb
│ │ │ └── cityindex
│ │ │ ├── City.java
│ │ │ ├── CitySelectorActivity.java
│ │ │ ├── CitySelectorAdapter.java
│ │ │ ├── Indexer.java
│ │ │ └── SectionBar.java
│ │ └── res
│ │ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── layout
│ │ ├── activity_city.xml
│ │ └── city_list_item.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── tubb.jks
├── build.gradle
├── build.log
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | .idea
4 | .DS_Store
5 | /build
6 | /publish
7 |
--------------------------------------------------------------------------------
/CityIndex.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | CityIndex
2 | =========
3 |
4 | Android - 快速索引Demo和多渠道打包
5 | 快速索引详见:http://blog.csdn.net/tu_bingbing/article/details/42151909
6 | 多渠道打包详见:https://github.com/TUBB/MultiChannelPlugin
7 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | generateDevelopDebugSources
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'io.github.tubb.multichannel'
3 |
4 | android {
5 | compileSdkVersion 27
6 | buildToolsVersion "27.0.3"
7 |
8 | defaultConfig {
9 | applicationId "com.tubb.cityindex"
10 | minSdkVersion 15
11 | targetSdkVersion 27
12 | versionCode 3
13 | versionName "4.0.0"
14 | }
15 | // 签名
16 | signingConfigs {
17 | myConfig {
18 | storeFile file("tubb.jks")
19 | storePassword "123456"
20 | keyAlias "tubb"
21 | keyPassword "123456"
22 | }
23 | }
24 | buildTypes {
25 | release {
26 | signingConfig signingConfigs.myConfig
27 | minifyEnabled true
28 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
29 | }
30 | }
31 | flavorDimensions "default"
32 | productFlavors {
33 | develop {
34 | dimension 'default'
35 | manifestPlaceholders = [ channel:"develop" ]
36 | }
37 | }
38 | lintOptions {
39 | abortOnError false
40 | }
41 | }
42 |
43 | appChannel {
44 | channelFlavorConfig {
45 | channelConfigFilePath "${project.getProjectDir()}/channels.txt"
46 | configProductFlavor { name ->
47 | if ('qq'.equals(name)) { // for test
48 | return {
49 | dimension 'default'
50 | manifestPlaceholders = [ channel:"${name}_yyb" ]
51 | }
52 | } else {
53 | return {
54 | dimension 'default'
55 | manifestPlaceholders = [ channel:name ]
56 | }
57 | }
58 | }
59 | // must call after configProductFlavor dsl
60 | createChannel()
61 | }
62 | bundleOutputConfig {
63 | outputDir "${project.getProjectDir()}/channels"
64 | renameBundleFile { project, variant ->
65 | // rename apk file
66 | project.name + '-' + variant.flavorName + '-' + variant.buildType.name + '-' + variant.versionName + '.apk'
67 | }
68 | }
69 | taskConfig {
70 | disableLintTask true
71 | disableDebugTask true
72 | disableTestTask true
73 | }
74 | }
75 |
76 | dependencies {
77 | implementation fileTree(dir: 'libs', include: ['*.jar'])
78 | implementation 'com.android.support:appcompat-v7:27.1.1'
79 | }
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/app/channels.txt:
--------------------------------------------------------------------------------
1 | qq
2 | m360
--------------------------------------------------------------------------------
/app/manifest-merger-channel-release-report.txt:
--------------------------------------------------------------------------------
1 | -- Merging decision tree log ---
2 | manifest
3 | ADDED from AndroidManifest.xml:2:1
4 | xmlns:android
5 | ADDED from AndroidManifest.xml:2:11
6 | package
7 | ADDED from AndroidManifest.xml:3:5
8 | INJECTED from AndroidManifest.xml:0:0
9 | INJECTED from AndroidManifest.xml:0:0
10 | android:versionName
11 | INJECTED from AndroidManifest.xml:0:0
12 | INJECTED from AndroidManifest.xml:0:0
13 | android:versionCode
14 | INJECTED from AndroidManifest.xml:0:0
15 | INJECTED from AndroidManifest.xml:0:0
16 | application
17 | ADDED from AndroidManifest.xml:5:5
18 | MERGED from com.android.support:appcompat-v7:21.0.3:16:5
19 | MERGED from com.android.support:support-v4:21.0.3:16:5
20 | android:label
21 | ADDED from AndroidManifest.xml:8:9
22 | android:allowBackup
23 | ADDED from AndroidManifest.xml:6:9
24 | android:icon
25 | ADDED from AndroidManifest.xml:7:9
26 | android:theme
27 | ADDED from AndroidManifest.xml:9:9
28 | activity#com.tubb.cityindex.CitySelectorActivity
29 | ADDED from AndroidManifest.xml:10:9
30 | android:label
31 | ADDED from AndroidManifest.xml:12:13
32 | android:name
33 | ADDED from AndroidManifest.xml:11:13
34 | intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
35 | ADDED from AndroidManifest.xml:13:13
36 | action#android.intent.action.MAIN
37 | ADDED from AndroidManifest.xml:14:17
38 | android:name
39 | ADDED from AndroidManifest.xml:14:25
40 | category#android.intent.category.LAUNCHER
41 | ADDED from AndroidManifest.xml:16:17
42 | android:name
43 | ADDED from AndroidManifest.xml:16:27
44 | meta-data#UMENG_CHANNEL
45 | ADDED from AndroidManifest.xml:19:9
46 | android:name
47 | ADDED from AndroidManifest.xml:19:20
48 | android:value
49 | ADDED from AndroidManifest.xml:19:49
50 | INJECTED from AndroidManifest.xml:0:0
51 | uses-sdk
52 | INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested
53 | MERGED from com.android.support:appcompat-v7:21.0.3:15:5
54 | MERGED from com.android.support:support-v4:21.0.3:15:5
55 | android:targetSdkVersion
56 | INJECTED from AndroidManifest.xml:0:0
57 | INJECTED from AndroidManifest.xml:0:0
58 | android:minSdkVersion
59 | INJECTED from AndroidManifest.xml:0:0
60 | INJECTED from AndroidManifest.xml:0:0
61 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Soft Install Path\android-studio\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/tubb/cityindex/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.tubb.cityindex;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tubb/cityindex/City.java:
--------------------------------------------------------------------------------
1 | package com.tubb.cityindex;
2 |
3 | import android.support.annotation.NonNull;
4 |
5 | public class City implements Comparable {
6 |
7 | private String id;
8 | private String name;
9 |
10 | public String getId() {
11 | return id;
12 | }
13 |
14 | public void setId(String id) {
15 | this.id = id;
16 | }
17 |
18 | public String getName() {
19 | return name;
20 | }
21 |
22 | public void setName(String name) {
23 | this.name = name;
24 | }
25 |
26 | @Override
27 | public int compareTo(@NonNull City another) {
28 | if(another == null){
29 | return -1;
30 | }
31 | return id.compareTo(another.getId());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tubb/cityindex/CitySelectorActivity.java:
--------------------------------------------------------------------------------
1 | package com.tubb.cityindex;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.AdapterView;
7 | import android.widget.ListView;
8 |
9 | import java.util.ArrayList;
10 | import java.util.Collections;
11 | import java.util.List;
12 |
13 | public class CitySelectorActivity extends Activity{
14 |
15 | ListView lvCity;
16 | SectionBar sbCity;
17 |
18 | @Override
19 | protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.activity_city);
22 | lvCity = (ListView)findViewById(R.id.lvCity);
23 | sbCity = (SectionBar)findViewById(R.id.sbCity);
24 | setLvCity();
25 | }
26 |
27 | private void setLvCity() {
28 | City city = new City();
29 | city.setId("#");
30 | city.setName("北京");
31 | City city2 = new City();
32 | city2.setId("a");
33 | city2.setName("阿拉斯加");
34 | City city3 = new City();
35 | city3.setId("a");
36 | city3.setName("安吉");
37 | City city4 = new City();
38 | city4.setId("e");
39 | city4.setName("鄂尔多斯");
40 | City city5 = new City();
41 | city5.setId("e");
42 | city5.setName("鄂尔多斯韭");
43 | City city6 = new City();
44 | city6.setId("r");
45 | city6.setName("热河");
46 | City city7 = new City();
47 | city7.setId("y");
48 | city7.setName("伊川");
49 | City city8 = new City();
50 | city8.setId("b");
51 | city8.setName("北海道");
52 | City city9 = new City();
53 | city9.setId("s");
54 | city9.setName("上海");
55 | City city10 = new City();
56 | city10.setId("c");
57 | city10.setName("长北");
58 | City city11 = new City();
59 | city11.setId("i");
60 | city11.setName("爱尔兰");
61 | City city12 = new City();
62 | city12.setId("j");
63 | city12.setName("姜丝");
64 | City city13 = new City();
65 | city13.setId("j");
66 | city13.setName("建州");
67 | City city14 = new City();
68 | city14.setId("m");
69 | city14.setName("马总");
70 | City city15 = new City();
71 | city15.setId("y");
72 | city15.setName("雨荷");
73 | final List citys = new ArrayList();
74 | citys.add(city);
75 | citys.add(city2);
76 | citys.add(city3);
77 | citys.add(city4);
78 | citys.add(city5);
79 | citys.add(city6);
80 | citys.add(city7);
81 | citys.add(city8);
82 | citys.add(city9);
83 | citys.add(city10);
84 | citys.add(city11);
85 | citys.add(city12);
86 | citys.add(city13);
87 | citys.add(city14);
88 | citys.add(city15);
89 | Collections.sort(citys);
90 | CitySelectorAdapter adapter = new CitySelectorAdapter(this,citys);
91 | lvCity.setAdapter(adapter);
92 | sbCity.setListView(lvCity);
93 | lvCity.setOnItemClickListener(new AdapterView.OnItemClickListener() {
94 | @Override
95 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
96 | // TODO
97 | }
98 | });
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tubb/cityindex/CitySelectorAdapter.java:
--------------------------------------------------------------------------------
1 | package com.tubb.cityindex;
2 |
3 | import android.view.View;
4 | import android.view.ViewGroup;
5 | import android.widget.BaseAdapter;
6 | import java.util.ArrayList;
7 | import java.util.HashMap;
8 | import java.util.List;
9 | import android.content.Context;
10 | import android.view.LayoutInflater;
11 | import android.widget.TextView;
12 |
13 | public class CitySelectorAdapter extends BaseAdapter implements Indexer {
14 |
15 | private final LayoutInflater mInflate;
16 | private List mCitys;
17 | private Context mContext;
18 | private HashMap indexMap = new HashMap();
19 |
20 | public CitySelectorAdapter(Context context, List citys) {
21 | mCitys = citys;
22 | mContext = context;
23 | mInflate = LayoutInflater.from(mContext);
24 | // 列表特征和分组首项进行关联
25 | for (int i = 0; i < mCitys.size(); i++) {
26 | City city = mCitys.get(i);
27 | String cityId = city.getId();
28 | if(cityId == null || "".equals(cityId)) continue;
29 | String section = cityId.toUpperCase().substring(0, 1);
30 | if(!indexMap.containsKey(section)){
31 | indexMap.put(section, i);
32 | }
33 | }
34 | }
35 | public int getCount() {
36 | return mCitys.size();
37 | }
38 | public Object getItem(int position) {
39 | return mCitys.get(position);
40 | }
41 | public long getItemId(int position) {
42 | return mCitys.get(position).getId().hashCode();
43 | }
44 | public View getView(int position, View convertView, ViewGroup parent) {
45 |
46 | ViewHolder holder = null;
47 | if(convertView == null){
48 | convertView = mInflate.inflate(R.layout.city_list_item, parent, false);
49 | holder = new ViewHolder();
50 | holder.tvName = (TextView)convertView.findViewById(R.id.tvName);
51 | holder.tvSection = (TextView)convertView.findViewById(R.id.tvSection);
52 | convertView.setTag(holder);
53 | }else{
54 | holder = (ViewHolder)convertView.getTag();
55 | }
56 | City city = mCitys.get(position);
57 | holder.tvName.setText(city.getName());
58 |
59 | String id = city.getId();
60 | char idFirstChar = id.toUpperCase().charAt(0);
61 | if (position == 0) {
62 | setIndex(holder.tvSection, String.valueOf(idFirstChar));
63 | } else {
64 | String preLabel = mCitys.get(position - 1).getId();
65 | char preFirstChar = preLabel.toUpperCase().charAt(0);
66 | if (idFirstChar != preFirstChar) { // diff group
67 | setIndex(holder.tvSection, String.valueOf(idFirstChar));
68 | } else { // same group
69 | holder.tvSection.setVisibility(View.GONE);
70 | }
71 | }
72 | return convertView;
73 | }
74 |
75 | private void setIndex(TextView section, String str){
76 | section.setVisibility(View.VISIBLE);
77 | if("#".equals(str)) section.setText("当前城市");
78 | else section.setText(str);
79 | }
80 |
81 | @Override
82 | public int getStartPositionOfSection(String section) {
83 | if(indexMap.containsKey(section))
84 | return indexMap.get(section);
85 | return -1;
86 | }
87 |
88 | static class ViewHolder{
89 | TextView tvName;
90 | TextView tvSection;
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tubb/cityindex/Indexer.java:
--------------------------------------------------------------------------------
1 | package com.tubb.cityindex;
2 |
3 | public interface Indexer {
4 | int getStartPositionOfSection(String section);
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tubb/cityindex/SectionBar.java:
--------------------------------------------------------------------------------
1 | package com.tubb.cityindex;
2 |
3 | import android.content.Context;
4 | import android.content.res.Resources;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 | import android.util.AttributeSet;
8 | import android.util.DisplayMetrics;
9 | import android.view.MotionEvent;
10 | import android.view.View;
11 | import android.widget.Adapter;
12 | import android.widget.ListView;
13 |
14 | public class SectionBar extends View {
15 |
16 | private static final char[] WORDS = new char[]{
17 | '#','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
18 | 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
19 | 'X', 'Y', 'Z'
20 | };
21 |
22 | private int wordSize = 16;
23 | private int preHeight = wordSize + 2;
24 |
25 | private ListView mListView;
26 | private Indexer mSectionIndexter;
27 | // 垂直居中
28 | private int heightCenter;
29 | private Paint mPaint;
30 |
31 | public SectionBar(Context context, AttributeSet attrs) {
32 | this(context, attrs, 0);
33 | }
34 |
35 | public SectionBar(Context context, AttributeSet attrs, int defStyle) {
36 | super(context, attrs, defStyle);
37 | init();
38 | }
39 |
40 | private void init() {
41 | wordSize = convertDpToPixel(wordSize, getContext());
42 | preHeight = convertDpToPixel(preHeight, getContext());
43 | mPaint = new Paint();
44 | mPaint.setColor(getResources().getColor(R.color.index_word));
45 | mPaint.setTextSize(preHeight);
46 | mPaint.setTextAlign(Paint.Align.CENTER);
47 | mPaint.setAntiAlias(true);
48 | }
49 |
50 | public void setListView(ListView listView) {
51 | mListView = listView;
52 | Adapter adapter = mListView.getAdapter();
53 | if (adapter == null || !(adapter instanceof Indexer)) throw new RuntimeException("ListView must set Adapter or Adapter must implements Indexer interface");
54 | mSectionIndexter = (Indexer) adapter;
55 | }
56 |
57 | public boolean onTouchEvent(MotionEvent event) {
58 | int startY = (int) event.getY() - heightCenter;
59 | int index = startY / preHeight;
60 | if (index >= WORDS.length) {
61 | index = WORDS.length - 1;
62 | } else if (index < 0) {
63 | index = 0;
64 | }
65 | if (event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_MOVE) {
66 | int position = mSectionIndexter.getStartPositionOfSection(String.valueOf(WORDS[index]));
67 | if (position == -1) {
68 | return true;
69 | }
70 | mListView.setSelection(position);
71 | }
72 | return true;
73 | }
74 |
75 | @Override
76 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
77 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
78 | heightCenter = getMeasuredHeight()/2 - preHeight*WORDS.length/2;
79 | }
80 |
81 | @Override
82 | protected void onDraw(Canvas canvas) {
83 | for (int i = 0; i < WORDS.length; i++) {
84 | canvas.drawText(String.valueOf(WORDS[i]), getMeasuredWidth()/2, preHeight
85 | + (i * preHeight) + heightCenter, mPaint);
86 | }
87 | super.onDraw(canvas);
88 | }
89 |
90 | public static int convertDpToPixel(float dp, Context context){
91 | Resources resources = context.getResources();
92 | DisplayMetrics metrics = resources.getDisplayMetrics();
93 | int px = (int)(dp * (metrics.densityDpi / 160f) + 0.5);
94 | return px;
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUBB/CityIndex/2356cc9e53d3fe4bfbcb6bde0e02ff659387cf61/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUBB/CityIndex/2356cc9e53d3fe4bfbcb6bde0e02ff659387cf61/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUBB/CityIndex/2356cc9e53d3fe4bfbcb6bde0e02ff659387cf61/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUBB/CityIndex/2356cc9e53d3fe4bfbcb6bde0e02ff659387cf61/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_city.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
14 |
15 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/city_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
16 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #28C4B2
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CityIndex
5 | Hello world!
6 | Settings
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/tubb.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUBB/CityIndex/2356cc9e53d3fe4bfbcb6bde0e02ff659387cf61/app/tubb.jks
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.1.1'
10 | classpath 'io.github.tubb:multichannel:1.0.1'
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/build.log:
--------------------------------------------------------------------------------
1 | -----------[]
2 | ===========baidu
3 | ===========m360
4 | Incremental java compilation is an incubating feature.
5 | disable task assembleAndroidTest by AppChannelPlugin
6 | disable task assembleBaiduDebug by AppChannelPlugin
7 | disable task assembleBaiduDebugAndroidTest by AppChannelPlugin
8 | disable task assembleBaiduDebugUnitTest by AppChannelPlugin
9 | disable task assembleBaiduReleaseUnitTest by AppChannelPlugin
10 | disable task assembleDebug by AppChannelPlugin
11 | disable task assembleM360Debug by AppChannelPlugin
12 | disable task assembleM360DebugAndroidTest by AppChannelPlugin
13 | disable task assembleM360DebugUnitTest by AppChannelPlugin
14 | disable task assembleM360ReleaseUnitTest by AppChannelPlugin
15 | disable task checkBaiduDebugManifest by AppChannelPlugin
16 | disable task checkM360DebugManifest by AppChannelPlugin
17 | disable task compileBaiduDebugAidl by AppChannelPlugin
18 | disable task compileBaiduDebugAndroidTestAidl by AppChannelPlugin
19 | disable task compileBaiduDebugAndroidTestJavaWithJavac by AppChannelPlugin
20 | disable task compileBaiduDebugAndroidTestNdk by AppChannelPlugin
21 | disable task compileBaiduDebugAndroidTestRenderscript by AppChannelPlugin
22 | disable task compileBaiduDebugAndroidTestShaders by AppChannelPlugin
23 | disable task compileBaiduDebugAndroidTestSources by AppChannelPlugin
24 | disable task compileBaiduDebugJavaWithJavac by AppChannelPlugin
25 | disable task compileBaiduDebugNdk by AppChannelPlugin
26 | disable task compileBaiduDebugRenderscript by AppChannelPlugin
27 | disable task compileBaiduDebugShaders by AppChannelPlugin
28 | disable task compileBaiduDebugSources by AppChannelPlugin
29 | disable task compileBaiduDebugUnitTestJavaWithJavac by AppChannelPlugin
30 | disable task compileBaiduDebugUnitTestSources by AppChannelPlugin
31 | disable task compileBaiduReleaseUnitTestJavaWithJavac by AppChannelPlugin
32 | disable task compileBaiduReleaseUnitTestSources by AppChannelPlugin
33 | disable task compileLint by AppChannelPlugin
34 | disable task compileM360DebugAidl by AppChannelPlugin
35 | disable task compileM360DebugAndroidTestAidl by AppChannelPlugin
36 | disable task compileM360DebugAndroidTestJavaWithJavac by AppChannelPlugin
37 | disable task compileM360DebugAndroidTestNdk by AppChannelPlugin
38 | disable task compileM360DebugAndroidTestRenderscript by AppChannelPlugin
39 | disable task compileM360DebugAndroidTestShaders by AppChannelPlugin
40 | disable task compileM360DebugAndroidTestSources by AppChannelPlugin
41 | disable task compileM360DebugJavaWithJavac by AppChannelPlugin
42 | disable task compileM360DebugNdk by AppChannelPlugin
43 | disable task compileM360DebugRenderscript by AppChannelPlugin
44 | disable task compileM360DebugShaders by AppChannelPlugin
45 | disable task compileM360DebugSources by AppChannelPlugin
46 | disable task compileM360DebugUnitTestJavaWithJavac by AppChannelPlugin
47 | disable task compileM360DebugUnitTestSources by AppChannelPlugin
48 | disable task compileM360ReleaseUnitTestJavaWithJavac by AppChannelPlugin
49 | disable task compileM360ReleaseUnitTestSources by AppChannelPlugin
50 | disable task connectedAndroidTest by AppChannelPlugin
51 | disable task connectedBaiduDebugAndroidTest by AppChannelPlugin
52 | disable task connectedM360DebugAndroidTest by AppChannelPlugin
53 | disable task deviceAndroidTest by AppChannelPlugin
54 | disable task generateBaiduDebugAndroidTestAssets by AppChannelPlugin
55 | disable task generateBaiduDebugAndroidTestBuildConfig by AppChannelPlugin
56 | disable task generateBaiduDebugAndroidTestResValues by AppChannelPlugin
57 | disable task generateBaiduDebugAndroidTestResources by AppChannelPlugin
58 | disable task generateBaiduDebugAndroidTestSources by AppChannelPlugin
59 | disable task generateBaiduDebugAssets by AppChannelPlugin
60 | disable task generateBaiduDebugBuildConfig by AppChannelPlugin
61 | disable task generateBaiduDebugResValues by AppChannelPlugin
62 | disable task generateBaiduDebugResources by AppChannelPlugin
63 | disable task generateBaiduDebugSources by AppChannelPlugin
64 | disable task generateM360DebugAndroidTestAssets by AppChannelPlugin
65 | disable task generateM360DebugAndroidTestBuildConfig by AppChannelPlugin
66 | disable task generateM360DebugAndroidTestResValues by AppChannelPlugin
67 | disable task generateM360DebugAndroidTestResources by AppChannelPlugin
68 | disable task generateM360DebugAndroidTestSources by AppChannelPlugin
69 | disable task generateM360DebugAssets by AppChannelPlugin
70 | disable task generateM360DebugBuildConfig by AppChannelPlugin
71 | disable task generateM360DebugResValues by AppChannelPlugin
72 | disable task generateM360DebugResources by AppChannelPlugin
73 | disable task generateM360DebugSources by AppChannelPlugin
74 | disable task incrementalBaiduDebugAndroidTestJavaCompilationSafeguard by AppChannelPlugin
75 | disable task incrementalBaiduDebugJavaCompilationSafeguard by AppChannelPlugin
76 | disable task incrementalBaiduDebugUnitTestJavaCompilationSafeguard by AppChannelPlugin
77 | disable task incrementalBaiduReleaseUnitTestJavaCompilationSafeguard by AppChannelPlugin
78 | disable task incrementalM360DebugAndroidTestJavaCompilationSafeguard by AppChannelPlugin
79 | disable task incrementalM360DebugJavaCompilationSafeguard by AppChannelPlugin
80 | disable task incrementalM360DebugUnitTestJavaCompilationSafeguard by AppChannelPlugin
81 | disable task incrementalM360ReleaseUnitTestJavaCompilationSafeguard by AppChannelPlugin
82 | disable task installBaiduDebug by AppChannelPlugin
83 | disable task installBaiduDebugAndroidTest by AppChannelPlugin
84 | disable task installM360Debug by AppChannelPlugin
85 | disable task installM360DebugAndroidTest by AppChannelPlugin
86 | disable task jarBaiduDebugClasses by AppChannelPlugin
87 | disable task jarM360DebugClasses by AppChannelPlugin
88 | disable task lint by AppChannelPlugin
89 | disable task lintBaiduDebug by AppChannelPlugin
90 | disable task lintBaiduRelease by AppChannelPlugin
91 | disable task lintM360Debug by AppChannelPlugin
92 | disable task lintM360Release by AppChannelPlugin
93 | disable task lintVitalBaiduRelease by AppChannelPlugin
94 | disable task lintVitalM360Release by AppChannelPlugin
95 | disable task mergeBaiduDebugAndroidTestAssets by AppChannelPlugin
96 | disable task mergeBaiduDebugAndroidTestJniLibFolders by AppChannelPlugin
97 | disable task mergeBaiduDebugAndroidTestResources by AppChannelPlugin
98 | disable task mergeBaiduDebugAndroidTestShaders by AppChannelPlugin
99 | disable task mergeBaiduDebugAssets by AppChannelPlugin
100 | disable task mergeBaiduDebugJniLibFolders by AppChannelPlugin
101 | disable task mergeBaiduDebugResources by AppChannelPlugin
102 | disable task mergeBaiduDebugShaders by AppChannelPlugin
103 | disable task mergeM360DebugAndroidTestAssets by AppChannelPlugin
104 | disable task mergeM360DebugAndroidTestJniLibFolders by AppChannelPlugin
105 | disable task mergeM360DebugAndroidTestResources by AppChannelPlugin
106 | disable task mergeM360DebugAndroidTestShaders by AppChannelPlugin
107 | disable task mergeM360DebugAssets by AppChannelPlugin
108 | disable task mergeM360DebugJniLibFolders by AppChannelPlugin
109 | disable task mergeM360DebugResources by AppChannelPlugin
110 | disable task mergeM360DebugShaders by AppChannelPlugin
111 | disable task packageBaiduDebug by AppChannelPlugin
112 | disable task packageBaiduDebugAndroidTest by AppChannelPlugin
113 | disable task packageM360Debug by AppChannelPlugin
114 | disable task packageM360DebugAndroidTest by AppChannelPlugin
115 | disable task preBaiduDebugAndroidTestBuild by AppChannelPlugin
116 | disable task preBaiduDebugBuild by AppChannelPlugin
117 | disable task preBaiduDebugUnitTestBuild by AppChannelPlugin
118 | disable task preBaiduReleaseUnitTestBuild by AppChannelPlugin
119 | disable task preM360DebugAndroidTestBuild by AppChannelPlugin
120 | disable task preM360DebugBuild by AppChannelPlugin
121 | disable task preM360DebugUnitTestBuild by AppChannelPlugin
122 | disable task preM360ReleaseUnitTestBuild by AppChannelPlugin
123 | disable task prepareBaiduDebugAndroidTestDependencies by AppChannelPlugin
124 | disable task prepareBaiduDebugDependencies by AppChannelPlugin
125 | disable task prepareBaiduDebugUnitTestDependencies by AppChannelPlugin
126 | disable task prepareBaiduReleaseUnitTestDependencies by AppChannelPlugin
127 | disable task prepareM360DebugAndroidTestDependencies by AppChannelPlugin
128 | disable task prepareM360DebugDependencies by AppChannelPlugin
129 | disable task prepareM360DebugUnitTestDependencies by AppChannelPlugin
130 | disable task prepareM360ReleaseUnitTestDependencies by AppChannelPlugin
131 | disable task processBaiduDebugAndroidTestJavaRes by AppChannelPlugin
132 | disable task processBaiduDebugAndroidTestManifest by AppChannelPlugin
133 | disable task processBaiduDebugAndroidTestResources by AppChannelPlugin
134 | disable task processBaiduDebugJavaRes by AppChannelPlugin
135 | disable task processBaiduDebugManifest by AppChannelPlugin
136 | disable task processBaiduDebugResources by AppChannelPlugin
137 | disable task processBaiduDebugUnitTestJavaRes by AppChannelPlugin
138 | disable task processBaiduReleaseUnitTestJavaRes by AppChannelPlugin
139 | disable task processM360DebugAndroidTestJavaRes by AppChannelPlugin
140 | disable task processM360DebugAndroidTestManifest by AppChannelPlugin
141 | disable task processM360DebugAndroidTestResources by AppChannelPlugin
142 | disable task processM360DebugJavaRes by AppChannelPlugin
143 | disable task processM360DebugManifest by AppChannelPlugin
144 | disable task processM360DebugResources by AppChannelPlugin
145 | disable task processM360DebugUnitTestJavaRes by AppChannelPlugin
146 | disable task processM360ReleaseUnitTestJavaRes by AppChannelPlugin
147 | disable task testBaiduDebugUnitTest by AppChannelPlugin
148 | disable task testBaiduReleaseUnitTest by AppChannelPlugin
149 | disable task testM360DebugUnitTest by AppChannelPlugin
150 | disable task testM360ReleaseUnitTest by AppChannelPlugin
151 | disable task transformClassesWithDexForBaiduDebug by AppChannelPlugin
152 | disable task transformClassesWithDexForBaiduDebugAndroidTest by AppChannelPlugin
153 | disable task transformClassesWithDexForM360Debug by AppChannelPlugin
154 | disable task transformClassesWithDexForM360DebugAndroidTest by AppChannelPlugin
155 | disable task transformNative_libsWithMergeJniLibsForBaiduDebug by AppChannelPlugin
156 | disable task transformNative_libsWithMergeJniLibsForBaiduDebugAndroidTest by AppChannelPlugin
157 | disable task transformNative_libsWithMergeJniLibsForM360Debug by AppChannelPlugin
158 | disable task transformNative_libsWithMergeJniLibsForM360DebugAndroidTest by AppChannelPlugin
159 | disable task transformResourcesWithMergeJavaResForBaiduDebug by AppChannelPlugin
160 | disable task transformResourcesWithMergeJavaResForBaiduDebugAndroidTest by AppChannelPlugin
161 | disable task transformResourcesWithMergeJavaResForBaiduDebugUnitTest by AppChannelPlugin
162 | disable task transformResourcesWithMergeJavaResForBaiduReleaseUnitTest by AppChannelPlugin
163 | disable task transformResourcesWithMergeJavaResForM360Debug by AppChannelPlugin
164 | disable task transformResourcesWithMergeJavaResForM360DebugAndroidTest by AppChannelPlugin
165 | disable task transformResourcesWithMergeJavaResForM360DebugUnitTest by AppChannelPlugin
166 | disable task transformResourcesWithMergeJavaResForM360ReleaseUnitTest by AppChannelPlugin
167 | disable task uninstallBaiduDebug by AppChannelPlugin
168 | disable task uninstallBaiduDebugAndroidTest by AppChannelPlugin
169 | disable task uninstallM360Debug by AppChannelPlugin
170 | disable task uninstallM360DebugAndroidTest by AppChannelPlugin
171 | disable task validateSigningBaiduDebug by AppChannelPlugin
172 | disable task validateSigningBaiduDebugAndroidTest by AppChannelPlugin
173 | disable task validateSigningM360Debug by AppChannelPlugin
174 | disable task validateSigningM360DebugAndroidTest by AppChannelPlugin
175 | :app:clean
176 | :plugin:clean
177 | :app:preBuild UP-TO-DATE
178 | :app:preBaiduDebugBuild SKIPPED
179 | :app:checkBaiduDebugManifest SKIPPED
180 | :app:extractProguardFiles
181 | :app:preBaiduReleaseBuild
182 | :app:preM360DebugBuild SKIPPED
183 | :app:preM360ReleaseBuild
184 | :app:prepareComAndroidSupportAnimatedVectorDrawable2500Library
185 | :app:prepareComAndroidSupportAppcompatV72500Library
186 | :app:prepareComAndroidSupportSupportCompat2500Library
187 | :app:prepareComAndroidSupportSupportCoreUi2500Library
188 | :app:prepareComAndroidSupportSupportCoreUtils2500Library
189 | :app:prepareComAndroidSupportSupportFragment2500Library
190 | :app:prepareComAndroidSupportSupportMediaCompat2500Library
191 | :app:prepareComAndroidSupportSupportV42500Library
192 | :app:prepareComAndroidSupportSupportVectorDrawable2500Library
193 | :app:prepareBaiduDebugDependencies SKIPPED
194 | :app:compileBaiduDebugAidl SKIPPED
195 | :app:compileBaiduDebugRenderscript SKIPPED
196 | :app:generateBaiduDebugBuildConfig SKIPPED
197 | :app:generateBaiduDebugResValues SKIPPED
198 | :app:generateBaiduDebugResources SKIPPED
199 | :app:mergeBaiduDebugResources SKIPPED
200 | :app:processBaiduDebugManifest SKIPPED
201 | :app:processBaiduDebugResources SKIPPED
202 | :app:generateBaiduDebugSources SKIPPED
203 | :app:incrementalBaiduDebugJavaCompilationSafeguard SKIPPED
204 | :app:compileBaiduDebugJavaWithJavac SKIPPED
205 | :app:compileBaiduDebugNdk SKIPPED
206 | :app:compileBaiduDebugSources SKIPPED
207 | :app:mergeBaiduDebugShaders SKIPPED
208 | :app:compileBaiduDebugShaders SKIPPED
209 | :app:generateBaiduDebugAssets SKIPPED
210 | :app:mergeBaiduDebugAssets SKIPPED
211 | :app:transformClassesWithDexForBaiduDebug SKIPPED
212 | :app:mergeBaiduDebugJniLibFolders SKIPPED
213 | :app:transformNative_libsWithMergeJniLibsForBaiduDebug SKIPPED
214 | :app:processBaiduDebugJavaRes SKIPPED
215 | :app:transformResourcesWithMergeJavaResForBaiduDebug SKIPPED
216 | :app:validateSigningBaiduDebug SKIPPED
217 | :app:packageBaiduDebug SKIPPED
218 | :app:assembleBaiduDebug SKIPPED
219 | :app:checkM360DebugManifest SKIPPED
220 | :app:prepareM360DebugDependencies SKIPPED
221 | :app:compileM360DebugAidl SKIPPED
222 | :app:compileM360DebugRenderscript SKIPPED
223 | :app:generateM360DebugBuildConfig SKIPPED
224 | :app:generateM360DebugResValues SKIPPED
225 | :app:generateM360DebugResources SKIPPED
226 | :app:mergeM360DebugResources SKIPPED
227 | :app:processM360DebugManifest SKIPPED
228 | :app:processM360DebugResources SKIPPED
229 | :app:generateM360DebugSources SKIPPED
230 | :app:incrementalM360DebugJavaCompilationSafeguard SKIPPED
231 | :app:compileM360DebugJavaWithJavac SKIPPED
232 | :app:compileM360DebugNdk SKIPPED
233 | :app:compileM360DebugSources SKIPPED
234 | :app:mergeM360DebugShaders SKIPPED
235 | :app:compileM360DebugShaders SKIPPED
236 | :app:generateM360DebugAssets SKIPPED
237 | :app:mergeM360DebugAssets SKIPPED
238 | :app:transformClassesWithDexForM360Debug SKIPPED
239 | :app:mergeM360DebugJniLibFolders SKIPPED
240 | :app:transformNative_libsWithMergeJniLibsForM360Debug SKIPPED
241 | :app:processM360DebugJavaRes SKIPPED
242 | :app:transformResourcesWithMergeJavaResForM360Debug SKIPPED
243 | :app:validateSigningM360Debug SKIPPED
244 | :app:packageM360Debug SKIPPED
245 | :app:assembleM360Debug SKIPPED
246 | :app:assembleDebug SKIPPED
247 | :app:checkBaiduReleaseManifest
248 | :app:prepareBaiduReleaseDependencies
249 | :app:compileBaiduReleaseAidl
250 | :app:compileBaiduReleaseRenderscript
251 | :app:generateBaiduReleaseBuildConfig
252 | :app:generateBaiduReleaseResValues
253 | :app:generateBaiduReleaseResources
254 | :app:mergeBaiduReleaseResources
255 | :app:processBaiduReleaseManifest
256 | :app:processBaiduReleaseResources
257 | :app:generateBaiduReleaseSources
258 | :app:incrementalBaiduReleaseJavaCompilationSafeguard
259 | :app:compileBaiduReleaseJavaWithJavac
260 | :app:compileBaiduReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
261 | :app:compileBaiduReleaseNdk UP-TO-DATE
262 | :app:compileBaiduReleaseSources
263 | :app:lintVitalBaiduRelease SKIPPED
264 | :app:mergeBaiduReleaseShaders
265 | :app:compileBaiduReleaseShaders
266 | :app:generateBaiduReleaseAssets
267 | :app:mergeBaiduReleaseAssets
268 | :app:processBaiduReleaseJavaRes UP-TO-DATE
269 | :app:transformResourcesWithMergeJavaResForBaiduRelease
270 | :app:transformClassesAndResourcesWithProguardForBaiduRelease
271 | ProGuard, version 5.2.1
272 | Reading input...
273 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/classes.jar] (filtered)
274 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.0.0/jars/classes.jar] (filtered)
275 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/classes.jar] (filtered)
276 | Reading program jar [/Users/tubingbing/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.0.0/support-annotations-25.0.0.jar] (filtered)
277 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
278 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
279 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/classes.jar] (filtered)
280 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.0.0/jars/classes.jar] (filtered)
281 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-v4/25.0.0/jars/classes.jar] (filtered)
282 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/classes.jar] (filtered)
283 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
284 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
285 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
286 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/classes.jar] (filtered)
287 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.0.0/jars/classes.jar] (filtered)
288 | Reading program directory [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/classes/baidu/release] (filtered)
289 | Reading library jar [/Users/tubingbing/Library/Android/sdk/platforms/android-25/android.jar]
290 | Reading library jar [/Users/tubingbing/Library/Android/sdk/platforms/android-25/optional/org.apache.http.legacy.jar]
291 | Note: duplicate definition of library class [org.apache.http.params.HttpConnectionParams]
292 | Note: duplicate definition of library class [org.apache.http.params.HttpParams]
293 | Note: duplicate definition of library class [org.apache.http.params.CoreConnectionPNames]
294 | Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
295 | Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
296 | Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
297 | Note: duplicate definition of library class [org.apache.http.conn.scheme.LayeredSocketFactory]
298 | Note: duplicate definition of library class [android.net.http.HttpResponseCache]
299 | Note: duplicate definition of library class [android.net.http.SslCertificate]
300 | Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
301 | Note: duplicate definition of library class [android.net.http.SslError]
302 | Initializing...
303 | Ignoring unused library classes...
304 | Original number of library classes: 4237
305 | Final number of library classes: 970
306 | Printing kept classes, fields, and methods...
307 | Shrinking...
308 | Printing usage to [/Users/tubingbing/StudioProjects/CityIndex/app/build/outputs/mapping/baidu/release/usage.txt]...
309 | Removing unused program classes and class elements...
310 | Original number of program classes: 1635
311 | Final number of program classes: 463
312 | Obfuscating...
313 | Printing mapping to [/Users/tubingbing/StudioProjects/CityIndex/app/build/outputs/mapping/baidu/release/mapping.txt]...
314 | Writing output...
315 | Preparing output jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/transforms/proguard/baidu/release/jars/3/1f/main.jar]
316 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/classes.jar] (filtered)
317 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.0.0/jars/classes.jar] (filtered)
318 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/classes.jar] (filtered)
319 | Copying resources from program jar [/Users/tubingbing/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.0.0/support-annotations-25.0.0.jar] (filtered)
320 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
321 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
322 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/classes.jar] (filtered)
323 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.0.0/jars/classes.jar] (filtered)
324 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-v4/25.0.0/jars/classes.jar] (filtered)
325 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/classes.jar] (filtered)
326 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
327 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
328 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
329 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/classes.jar] (filtered)
330 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.0.0/jars/classes.jar] (filtered)
331 | Copying resources from program directory [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/classes/baidu/release] (filtered)
332 | Printing classes to [/Users/tubingbing/StudioProjects/CityIndex/app/build/outputs/mapping/baidu/release/dump.txt]...
333 | :app:transformClassesWithDexForBaiduRelease
334 | :app:mergeBaiduReleaseJniLibFolders
335 | :app:transformNative_libsWithMergeJniLibsForBaiduRelease
336 | :app:validateSigningBaiduRelease
337 | :app:packageBaiduRelease
338 | :app:assembleBaiduRelease
339 | :app:checkM360ReleaseManifest
340 | :app:prepareM360ReleaseDependencies
341 | :app:compileM360ReleaseAidl
342 | :app:compileM360ReleaseRenderscript
343 | :app:generateM360ReleaseBuildConfig
344 | :app:generateM360ReleaseResValues
345 | :app:generateM360ReleaseResources
346 | :app:mergeM360ReleaseResources
347 | :app:processM360ReleaseManifest
348 | :app:processM360ReleaseResources
349 | :app:generateM360ReleaseSources
350 | :app:incrementalM360ReleaseJavaCompilationSafeguard
351 | :app:compileM360ReleaseJavaWithJavac
352 | :app:compileM360ReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
353 | :app:compileM360ReleaseNdk UP-TO-DATE
354 | :app:compileM360ReleaseSources
355 | :app:lintVitalM360Release SKIPPED
356 | :app:mergeM360ReleaseShaders
357 | :app:compileM360ReleaseShaders
358 | :app:generateM360ReleaseAssets
359 | :app:mergeM360ReleaseAssets
360 | :app:processM360ReleaseJavaRes UP-TO-DATE
361 | :app:transformResourcesWithMergeJavaResForM360Release
362 | :app:transformClassesAndResourcesWithProguardForM360Release
363 | ProGuard, version 5.2.1
364 | Reading input...
365 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/classes.jar] (filtered)
366 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.0.0/jars/classes.jar] (filtered)
367 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/classes.jar] (filtered)
368 | Reading program jar [/Users/tubingbing/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.0.0/support-annotations-25.0.0.jar] (filtered)
369 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
370 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
371 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/classes.jar] (filtered)
372 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.0.0/jars/classes.jar] (filtered)
373 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-v4/25.0.0/jars/classes.jar] (filtered)
374 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/classes.jar] (filtered)
375 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
376 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
377 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
378 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/classes.jar] (filtered)
379 | Reading program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.0.0/jars/classes.jar] (filtered)
380 | Reading program directory [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/classes/m360/release] (filtered)
381 | Reading library jar [/Users/tubingbing/Library/Android/sdk/platforms/android-25/android.jar]
382 | Reading library jar [/Users/tubingbing/Library/Android/sdk/platforms/android-25/optional/org.apache.http.legacy.jar]
383 | Note: duplicate definition of library class [org.apache.http.params.HttpConnectionParams]
384 | Note: duplicate definition of library class [org.apache.http.params.HttpParams]
385 | Note: duplicate definition of library class [org.apache.http.params.CoreConnectionPNames]
386 | Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
387 | Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
388 | Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
389 | Note: duplicate definition of library class [org.apache.http.conn.scheme.LayeredSocketFactory]
390 | Note: duplicate definition of library class [android.net.http.HttpResponseCache]
391 | Note: duplicate definition of library class [android.net.http.SslCertificate]
392 | Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
393 | Note: duplicate definition of library class [android.net.http.SslError]
394 | Initializing...
395 | Ignoring unused library classes...
396 | Original number of library classes: 4237
397 | Final number of library classes: 970
398 | Printing kept classes, fields, and methods...
399 | Shrinking...
400 | Printing usage to [/Users/tubingbing/StudioProjects/CityIndex/app/build/outputs/mapping/m360/release/usage.txt]...
401 | Removing unused program classes and class elements...
402 | Original number of program classes: 1635
403 | Final number of program classes: 463
404 | Obfuscating...
405 | Printing mapping to [/Users/tubingbing/StudioProjects/CityIndex/app/build/outputs/mapping/m360/release/mapping.txt]...
406 | Writing output...
407 | Preparing output jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/transforms/proguard/m360/release/jars/3/1f/main.jar]
408 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/classes.jar] (filtered)
409 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.0.0/jars/classes.jar] (filtered)
410 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/classes.jar] (filtered)
411 | Copying resources from program jar [/Users/tubingbing/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.0.0/support-annotations-25.0.0.jar] (filtered)
412 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
413 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
414 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/classes.jar] (filtered)
415 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.0.0/jars/classes.jar] (filtered)
416 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-v4/25.0.0/jars/classes.jar] (filtered)
417 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/classes.jar] (filtered)
418 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
419 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
420 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars/libs/internal_impl-25.0.0.jar] (filtered)
421 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars/classes.jar] (filtered)
422 | Copying resources from program jar [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.0.0/jars/classes.jar] (filtered)
423 | Copying resources from program directory [/Users/tubingbing/StudioProjects/CityIndex/app/build/intermediates/classes/m360/release] (filtered)
424 | Printing classes to [/Users/tubingbing/StudioProjects/CityIndex/app/build/outputs/mapping/m360/release/dump.txt]...
425 | :app:transformClassesWithDexForM360Release
426 | :app:mergeM360ReleaseJniLibFolders
427 | :app:transformNative_libsWithMergeJniLibsForM360Release
428 | :app:validateSigningM360Release
429 | :app:packageM360Release
430 | :app:assembleM360Release
431 | :app:assembleRelease
432 | :app:assemble
433 | :app:lint SKIPPED
434 | :app:incrementalBaiduDebugUnitTestJavaCompilationSafeguard SKIPPED
435 | :app:preBaiduDebugUnitTestBuild SKIPPED
436 | :app:prepareBaiduDebugUnitTestDependencies SKIPPED
437 | :app:compileBaiduDebugUnitTestJavaWithJavac SKIPPED
438 | :app:processBaiduDebugUnitTestJavaRes SKIPPED
439 | :app:compileBaiduDebugUnitTestSources SKIPPED
440 | :app:mockableAndroidJar UP-TO-DATE
441 | :app:assembleBaiduDebugUnitTest SKIPPED
442 | :app:testBaiduDebugUnitTest SKIPPED
443 | :app:incrementalBaiduReleaseUnitTestJavaCompilationSafeguard SKIPPED
444 | :app:preBaiduReleaseUnitTestBuild SKIPPED
445 | :app:prepareBaiduReleaseUnitTestDependencies SKIPPED
446 | :app:compileBaiduReleaseUnitTestJavaWithJavac SKIPPED
447 | :app:processBaiduReleaseUnitTestJavaRes SKIPPED
448 | :app:compileBaiduReleaseUnitTestSources SKIPPED
449 | :app:assembleBaiduReleaseUnitTest SKIPPED
450 | :app:testBaiduReleaseUnitTest SKIPPED
451 | :app:incrementalM360DebugUnitTestJavaCompilationSafeguard SKIPPED
452 | :app:preM360DebugUnitTestBuild SKIPPED
453 | :app:prepareM360DebugUnitTestDependencies SKIPPED
454 | :app:compileM360DebugUnitTestJavaWithJavac SKIPPED
455 | :app:processM360DebugUnitTestJavaRes SKIPPED
456 | :app:compileM360DebugUnitTestSources SKIPPED
457 | :app:assembleM360DebugUnitTest SKIPPED
458 | :app:testM360DebugUnitTest SKIPPED
459 | :app:incrementalM360ReleaseUnitTestJavaCompilationSafeguard SKIPPED
460 | :app:preM360ReleaseUnitTestBuild SKIPPED
461 | :app:prepareM360ReleaseUnitTestDependencies SKIPPED
462 | :app:compileM360ReleaseUnitTestJavaWithJavac SKIPPED
463 | :app:processM360ReleaseUnitTestJavaRes SKIPPED
464 | :app:compileM360ReleaseUnitTestSources SKIPPED
465 | :app:assembleM360ReleaseUnitTest SKIPPED
466 | :app:testM360ReleaseUnitTest SKIPPED
467 | :app:test UP-TO-DATE
468 | :app:check UP-TO-DATE
469 | :app:build
470 | :plugin:compileJava UP-TO-DATE
471 | :plugin:compileGroovy
472 | :plugin:processResources
473 | :plugin:classes
474 | :plugin:jar
475 | :plugin:assemble
476 | :plugin:compileTestJava UP-TO-DATE
477 | :plugin:compileTestGroovy UP-TO-DATE
478 | :plugin:processTestResources UP-TO-DATE
479 | :plugin:testClasses UP-TO-DATE
480 | :plugin:test UP-TO-DATE
481 | :plugin:check UP-TO-DATE
482 | :plugin:build
483 |
484 | BUILD SUCCESSFUL
485 |
486 | Total time: 19.353 secs
487 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | org.gradle.jvmargs=-Xmx1536m
20 | org.gradle.daemon=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUBB/CityIndex/2356cc9e53d3fe4bfbcb6bde0e02ff659387cf61/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------