Skip to content

Commit 14f96c0

Browse files
committed
p031多版本打版重写gradle3.0 p043PaintProgressBar p045butterknife p045BannerViewAll
1 parent e962fdc commit 14f96c0

File tree

265 files changed

+6744
-323
lines changed

Some content is hidden

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

265 files changed

+6744
-323
lines changed

.idea/gradle.xml

+8-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+1-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DuerSdkLib/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
jcenter()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.2.2'
7+
classpath 'com.android.tools.build:gradle:3.0.0'
88

99
// NOTE: Do not place your application dependencies here; they belong
1010
// in the individual module build.gradle files
@@ -21,7 +21,7 @@ apply plugin: 'com.android.library'
2121

2222
android {
2323
compileSdkVersion 25
24-
buildToolsVersion '25'
24+
buildToolsVersion '26.0.2'
2525

2626
sourceSets {
2727
main {

P009_Glide图片缓存/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 23
5-
buildToolsVersion '25.0.0'
5+
buildToolsVersion '26.0.2'
66

77
defaultConfig {
88
applicationId "com.example.p009_glide"
99
minSdkVersion 19
10-
targetSdkVersion 23
10+
targetSdkVersion 26
1111
versionCode 1
1212
versionName "1.0"
1313
}

P009_Glide图片缓存/src/main/java/com/example/p009_glide/MainActivity.java

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ public class MainActivity extends AppCompatActivity {
4646
protected void onCreate(Bundle savedInstanceState) {
4747
super.onCreate(savedInstanceState);
4848
setContentView(R.layout.activity_main);
49+
50+
// DisplayMetrics dm = new DisplayMetrics();
51+
// getWindowManager().getDefaultDisplay().getMetrics(dm);
52+
// Log.e("--geekwidthPixels---",dm.widthPixels+"");
53+
// Log.e("--geekheightPixels---",dm.heightPixels+"");
54+
// Log.e("--geekdensity---",dm.density+"");
55+
56+
4957
tv1 = (TextView) findViewById(R.id.tv1);
5058
tv1.setOnClickListener(new View.OnClickListener() {
5159
@Override

build.gradle

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.3'
8+
classpath 'com.android.tools.build:gradle:3.0.0'
99
//p010
10-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
10+
// classpath 'com.android.tools.build:gradle:2.3.3'
11+
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
12+
//butterknifelibrary
13+
// classpath 'com.jakewharton:butterknife-gradle-plugin:8.6.0'
1114
//p015
1215
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
1316
//p028
@@ -29,6 +32,7 @@ allprojects {
2932
maven {
3033
url "https://maven.google.com"
3134
}
35+
3236
}
3337
}
3438

File renamed without changes.

butterknifelibrary/build.gradle

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apply plugin: 'com.android.library'
2+
//apply plugin: 'com.jakewharton:butterknife'
3+
4+
android {
5+
compileSdkVersion 26
6+
7+
defaultConfig {
8+
minSdkVersion 21
9+
targetSdkVersion 26
10+
versionCode 1
11+
versionName "1.0"
12+
javaCompileOptions {
13+
annotationProcessorOptions {
14+
includeCompileClasspath true
15+
}
16+
}
17+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
18+
19+
}
20+
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
28+
}
29+
30+
dependencies {
31+
implementation fileTree(dir: 'libs', include: ['*.jar'])
32+
33+
implementation 'com.android.support:appcompat-v7:26.1.0'
34+
testImplementation 'junit:junit:4.12'
35+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
36+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
37+
//the third file
38+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
39+
compile 'com.jakewharton:butterknife:8.6.0'
40+
}

butterknifelibrary/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.example.shining.butterknifelibrary;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.example.shining.butterknifelibrary.test", appContext.getPackageName());
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<manifest package="com.example.shining.butterknifelibrary" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.example.shining.butterknifelibrary;
2+
3+
import android.os.Bundle;
4+
import android.support.annotation.Nullable;
5+
import android.support.v7.app.AppCompatActivity;
6+
7+
/**
8+
* Created by shining on 2017/10/26.
9+
*/
10+
11+
public abstract class BaseActivity extends AppCompatActivity {
12+
@Override
13+
protected void onCreate(@Nullable Bundle savedInstanceState) {
14+
super.onCreate(savedInstanceState);
15+
setContentView(getLayoutId());
16+
setup(savedInstanceState);
17+
}
18+
protected abstract int getLayoutId();
19+
20+
protected void setup(@Nullable Bundle savedInstanceState) {
21+
22+
}
23+
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">ButterknifeLibrary</string>
3+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.example.shining.butterknifelibrary;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.*;
6+
7+
/**
8+
* Example local unit test, which will execute on the development machine (host).
9+
*
10+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11+
*/
12+
public class ExampleUnitTest {
13+
@Test
14+
public void addition_isCorrect() throws Exception {
15+
assertEquals(4, 2 + 2);
16+
}
17+
}

glide411library/build.gradle

+22-17
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,38 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 26
5-
buildToolsVersion "26.0.1"
5+
buildToolsVersion '26.0.2'
66

77
defaultConfig {
88
minSdkVersion 21
99
targetSdkVersion 26
1010
versionCode 1
1111
versionName "1.0"
1212

13-
}
13+
javaCompileOptions {
14+
annotationProcessorOptions {
15+
includeCompileClasspath true
16+
}
17+
}
1418

15-
lintOptions {
16-
abortOnError false
17-
}
18-
buildTypes {
19-
release {
20-
minifyEnabled false
21-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19+
lintOptions {
20+
abortOnError false
21+
}
22+
buildTypes {
23+
release {
24+
minifyEnabled false
25+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
26+
}
2227
}
2328
}
24-
}
2529

26-
dependencies {
27-
compile fileTree(dir: 'libs', include: ['*.jar'])
30+
dependencies {
31+
compile fileTree(dir: 'libs', include: ['*.jar'])
2832

2933
// compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
30-
compile 'com.android.support:support-v4:26.0.0-alpha1'
31-
compile 'com.github.bumptech.glide:glide:4.1.1'
32-
compile 'com.github.bumptech.glide:compiler:4.1.1'
33-
compile "com.github.bumptech.glide:okhttp3-integration:4.1.1"
34-
}
34+
compile 'com.android.support:support-v4:26.0.0-alpha1'
35+
compile 'com.github.bumptech.glide:glide:4.1.1'
36+
compile 'com.github.bumptech.glide:compiler:4.1.1'
37+
compile "com.github.bumptech.glide:okhttp3-integration:4.1.1"
38+
}
39+
}

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ POM_URL=https\://github.com/rubensousa/RecyclerViewSnap
3131
POM_SCM_CONNECTION=scm\:git\:git\://github.com/rubensousa/RecyclerViewSnap.git
3232
GROUP=com.github.rubensousa
3333
systemProp.http.proxyPort=80
34+
android.enableAapt2=false
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Mar 06 14:37:12 CST 2017
1+
#Thu Oct 26 14:28:54 CST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

gravitysnaphelper/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.0"
5+
buildToolsVersion '26.0.2'
66

77
defaultConfig {
88
minSdkVersion 15
File renamed without changes.

mzbanner/build.gradle

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 26
5+
buildToolsVersion "26.0.2"
6+
7+
defaultConfig {
8+
minSdkVersion 16
9+
targetSdkVersion 26
10+
versionCode 1
11+
versionName "1.0"
12+
13+
14+
}
15+
buildTypes {
16+
release {
17+
minifyEnabled false
18+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19+
}
20+
}
21+
}
22+
23+
dependencies {
24+
compile fileTree(dir: 'libs', include: ['*.jar'])
25+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
26+
exclude group: 'com.android.support', module: 'support-annotations'
27+
})
28+
compile 'com.android.support:appcompat-v7:25.3.1'
29+
testCompile 'junit:junit:4.12'
30+
}

0 commit comments

Comments
 (0)