Several small nitpicks and fixes
diff --git a/app/build.gradle b/app/build.gradle
index 2181569..4a39d83 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -3,13 +3,18 @@
apply plugin: 'com.android.application'
android {
+
compileSdkVersion 28
- buildToolsVersion '28.0.0'
+ buildToolsVersion '28.0.3'
+
+ defaultConfig {
+ minSdkVersion 26
+ targetSdkVersion 26
+ }
buildTypes {
release {
minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
@@ -28,28 +33,25 @@
}
}
-preBuild {
+preBuild.doLast {
+ def imlFile = file(project.name + ".iml")
- doLast {
- def imlFile = file(project.name + ".iml")
+ try {
+ def parsedXml = (new XmlParser()).parse(imlFile)
+ def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
+ parsedXml.component[1].remove(jdkNode)
- try {
- def parsedXml = (new XmlParser()).parse(imlFile)
- def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
- parsedXml.component[1].remove(jdkNode)
+ def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
+ new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
+ XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
- def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
- new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
- XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
-
- } catch (FileNotFoundException ex) {
- ex.printStackTrace()
- }
+ } catch (NullPointerException | FileNotFoundException ex) {
+ ex.printStackTrace()
}
}
dependencies {
compileOnly fileTree(include: ['android.jar', 'libcore.jar'], dir: 'libs')
- compile group: 'commons-io', name: 'commons-io', version: '2.6'
+ implementation group: 'commons-io', name: 'commons-io', version: '2.6'
}