Skip to content

Commit

Permalink
Add Android 10 support (29)
Browse files Browse the repository at this point in the history
  • Loading branch information
noties committed Dec 2, 2019
1 parent 99caf7e commit abe7c0f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

group 'ru.noties'
version '1.0.2'
version '1.0.3'

apply plugin: 'java'
apply plugin: 'application'
Expand All @@ -24,15 +24,10 @@ repositories {
}

dependencies {

compile 'com.google.code.findbugs:jsr305:3.0.2'

compile 'com.github.javaparser:javaparser-core:3.5.12'

compile 'com.google.googlejavaformat:google-java-format:1.5'

compile 'commons-cli:commons-cli:1.4'

compile 'commons-io:commons-io:2.6'
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ru/noties/enhance/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public String toString() {
new ApiVersion(25, "7.1", "Nougat"),
new ApiVersion(26, "8.0", "Oreo"),
new ApiVersion(27, "8.1", "Oreo"),
new ApiVersion(28, "9.0", "Pie")
new ApiVersion(28, "9.0", "Pie"),
new ApiVersion(29, "10", "Android")
};

private static final int LENGTH = VERSIONS.length;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/noties/enhance/ApiVersionFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private static class Impl extends ApiVersionFormatter {

@Override
public String format(@Nonnull ApiVersion apiVersion) {
// @since 5.1 Lollipop (22)
// for example - @since 5.1 Lollipop (22)
return apiVersion.getVersionName() + " " + apiVersion.getCodeName() + " (" + apiVersion.getSdkInt() + ")";
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/ru/noties/enhance/EnhanceWriterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public void write(@Nonnull File source, @Nonnull File destination) {
final String name = file.getName();
final File f = new File(destination, name);

if (name.endsWith(".java")) {
// @since 1.0.3 there are also `*.annotated.java` files, ignore them
if (name.endsWith(".java")
&& !name.endsWith(".annotated.java")) {

final String java = processJavaFile(file);
try {
Expand Down

0 comments on commit abe7c0f

Please sign in to comment.