Skip to content

Commit a207a31

Browse files
committed
add use of retropiler
1 parent 5fec8d3 commit a207a31

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

app/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.application'
2+
apply plugin: 'io.github.retropiler'
23

34
android {
45
compileSdkVersion 25
@@ -17,10 +18,14 @@ android {
1718
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1819
}
1920
}
21+
compileOptions {
22+
sourceCompatibility JavaVersion.VERSION_1_8
23+
targetCompatibility JavaVersion.VERSION_1_8
24+
}
2025
}
2126

2227
dependencies {
23-
compile fileTree(dir: 'libs', include: ['*.jar'])
28+
compile fileTree(include: ['*.jar'], dir: 'libs')
2429
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2530
exclude group: 'com.android.support', module: 'support-annotations'
2631
})
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
package io.github.gfx.java8androidexample;
22

3-
import android.support.v7.app.AppCompatActivity;
3+
import android.annotation.SuppressLint;
44
import android.os.Bundle;
5+
import android.support.v7.app.AppCompatActivity;
6+
import android.widget.TextView;
7+
8+
import java.util.Optional;
59

10+
@SuppressLint("NewApi")
611
public class MainActivity extends AppCompatActivity {
712

813
@Override
914
protected void onCreate(Bundle savedInstanceState) {
1015
super.onCreate(savedInstanceState);
1116
setContentView(R.layout.activity_main);
17+
18+
TextView textView = (TextView) findViewById(R.id.text);
19+
20+
Optional.of("foo").map(String::toUpperCase).ifPresent(textView::setText);
1221
}
1322
}

build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:2.3.1'
9-
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
9+
classpath 'io.github.retropiler:retropiler-gradle-plugin:0.0.2'
1210
}
1311
}
1412

0 commit comments

Comments
 (0)