Commit e623e60459d45963a5a87591f5ba1afb610b8541
1 parent
7aa28c8d
repair the wrong configuration Java8 support library causes compilation errors
Showing
6 changed files
with
9 additions
and
7 deletions
.idea/modules.xml
| @@ -3,8 +3,11 @@ | @@ -3,8 +3,11 @@ | ||
| 3 | <component name="ProjectModuleManager"> | 3 | <component name="ProjectModuleManager"> |
| 4 | <modules> | 4 | <modules> |
| 5 | <module fileurl="file://$PROJECT_DIR$/CNLiveLibs.iml" filepath="$PROJECT_DIR$/CNLiveLibs.iml" /> | 5 | <module fileurl="file://$PROJECT_DIR$/CNLiveLibs.iml" filepath="$PROJECT_DIR$/CNLiveLibs.iml" /> |
| 6 | + <module fileurl="file://$PROJECT_DIR$/CNLiveLibs.iml" filepath="$PROJECT_DIR$/CNLiveLibs.iml" /> | ||
| 6 | <module fileurl="file://$PROJECT_DIR$/OPenCNLive_BaseLib.iml" filepath="$PROJECT_DIR$/OPenCNLive_BaseLib.iml" /> | 7 | <module fileurl="file://$PROJECT_DIR$/OPenCNLive_BaseLib.iml" filepath="$PROJECT_DIR$/OPenCNLive_BaseLib.iml" /> |
| 7 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | 8 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
| 9 | + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | ||
| 10 | + <module fileurl="file://$PROJECT_DIR$/cnlive/cnlive.iml" filepath="$PROJECT_DIR$/cnlive/cnlive.iml" /> | ||
| 8 | <module fileurl="file://$PROJECT_DIR$/cnlive/cnlive.iml" filepath="$PROJECT_DIR$/cnlive/cnlive.iml" /> | 11 | <module fileurl="file://$PROJECT_DIR$/cnlive/cnlive.iml" filepath="$PROJECT_DIR$/cnlive/cnlive.iml" /> |
| 9 | </modules> | 12 | </modules> |
| 10 | </component> | 13 | </component> |
app/build.gradle
| 1 | apply plugin: 'com.android.application' | 1 | apply plugin: 'com.android.application' |
| 2 | +apply plugin: 'me.tatarka.retrolambda' | ||
| 2 | 3 | ||
| 3 | android { | 4 | android { |
| 4 | compileSdkVersion 26 | 5 | compileSdkVersion 26 |
| @@ -16,9 +17,7 @@ android { | @@ -16,9 +17,7 @@ android { | ||
| 16 | versionCode 1 | 17 | versionCode 1 |
| 17 | versionName "1.0" | 18 | versionName "1.0" |
| 18 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | 19 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 19 | - jackOptions { | ||
| 20 | - enabled true | ||
| 21 | - } | 20 | + |
| 22 | } | 21 | } |
| 23 | buildTypes { | 22 | buildTypes { |
| 24 | release { | 23 | release { |
app/src/main/java/com/cnlive/libs/demo/Java8Test.java
| @@ -20,7 +20,7 @@ public class Java8Test { | @@ -20,7 +20,7 @@ public class Java8Test { | ||
| 20 | 20 | ||
| 21 | List<String> list = Arrays.asList("1", "2", "3"); | 21 | List<String> list = Arrays.asList("1", "2", "3"); |
| 22 | 22 | ||
| 23 | - activity.findViewById(R.id.progressBar).setOnClickListener(view -> Log.e("DemoView", "view " + view.getClass().getName())); | 23 | + activity.findViewById(R.id.textView).setOnClickListener(view -> Log.e("DemoView", "view " + view.getClass().getName())); |
| 24 | 24 | ||
| 25 | stream(list).filter(str -> str.startsWith("1")).forEach(item ->Log.e("DemoView","New " + item)); | 25 | stream(list).filter(str -> str.startsWith("1")).forEach(item ->Log.e("DemoView","New " + item)); |
| 26 | 26 |
app/src/main/java/com/cnlive/libs/demo/MainActivity.java
app/src/main/res/layout/activity_main.xml
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | android:layout_height="match_parent" | 6 | android:layout_height="match_parent" |
| 7 | tools:context="com.cnlive.libs.demo.MainActivity"> | 7 | tools:context="com.cnlive.libs.demo.MainActivity"> |
| 8 | 8 | ||
| 9 | - <TextView | 9 | + <TextView android:id="@+id/textView" |
| 10 | android:layout_width="wrap_content" | 10 | android:layout_width="wrap_content" |
| 11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 12 | android:text="Hello World!" | 12 | android:text="Hello World!" |
cnlive/build.gradle
| 1 | apply plugin: 'com.android.library' | 1 | apply plugin: 'com.android.library' |
| 2 | apply plugin: 'maven' | 2 | apply plugin: 'maven' |
| 3 | -apply plugin: 'me.tatarka.retrolambda' | ||
| 4 | 3 | ||
| 5 | android { | 4 | android { |
| 6 | compileSdkVersion 26 | 5 | compileSdkVersion 26 |
| @@ -50,7 +49,6 @@ dependencies { | @@ -50,7 +49,6 @@ dependencies { | ||
| 50 | compile 'net.sourceforge.streamsupport:streamsupport-atomic:1.5.5' | 49 | compile 'net.sourceforge.streamsupport:streamsupport-atomic:1.5.5' |
| 51 | compile 'net.sourceforge.streamsupport:streamsupport-flow:1.5.5' | 50 | compile 'net.sourceforge.streamsupport:streamsupport-flow:1.5.5' |
| 52 | compile 'net.sourceforge.streamsupport:streamsupport-literal:1.5.5' | 51 | compile 'net.sourceforge.streamsupport:streamsupport-literal:1.5.5' |
| 53 | - | ||
| 54 | } | 52 | } |
| 55 | 53 | ||
| 56 | ext { | 54 | ext { |