reduse size
This commit is contained in:
parent
27fabebd76
commit
88bc879a4a
3 changed files with 30 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
import com.android.build.OutputFile
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.2"
|
||||
|
|
@ -26,7 +28,8 @@ android {
|
|||
minifyEnabled false
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
shrinkResources true
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
|
|
@ -34,14 +37,25 @@ android {
|
|||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def file = output.packageApplication.outputFile
|
||||
def fileName = org.apache.commons.io.FilenameUtils.getExtension(android.defaultConfig.applicationId) + "-" + android.defaultConfig.versionName + "-" + variant.buildType.name + ".apk"
|
||||
def abi = output.getFilter(OutputFile.ABI)
|
||||
if (abi == null)
|
||||
abi = "universal";
|
||||
def fileName = org.apache.commons.io.FilenameUtils.getExtension(android.defaultConfig.applicationId) + "-" + abi + "-" + android.defaultConfig.versionName + "-" + variant.buildType.name + ".apk"
|
||||
output.packageApplication.outputFile = new File(file.parent, fileName)
|
||||
}
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include "x86", "armeabi-v7a", "mips"
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.github.axet:android-audio-library:1.0.42' // compile project(':android-audio-library')
|
||||
compile 'com.github.axet:android-audio-library:1.0.43' // compile project(':android-audio-library')
|
||||
}
|
||||
|
|
|
|||
11
app/proguard-rules.pro
vendored
11
app/proguard-rules.pro
vendored
|
|
@ -15,3 +15,14 @@
|
|||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
-dontobfuscate
|
||||
|
||||
-keep class com.github.axet.vorbisjni.Vorbis {*;}
|
||||
-keep class com.github.axet.lamejni.Lame {*;}
|
||||
-keep class com.github.axet.opusjni.Opus {*;}
|
||||
|
||||
-dontwarn net.sourceforge.javaflacencoder.**
|
||||
-dontwarn com.jssrc.resample.**
|
||||
-dontwarn org.apache.commons.**
|
||||
-dontwarn org.slf4j.**
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ public class RecordingActivity extends AppCompatActivity {
|
|||
if (file != null) {
|
||||
if (file.startsWith(ContentResolver.SCHEME_CONTENT))
|
||||
targetUri = Uri.parse(file);
|
||||
else if (file.startsWith(ContentResolver.SCHEME_FILE))
|
||||
targetUri = Uri.parse(file);
|
||||
else
|
||||
targetUri = Uri.fromFile(new File(file));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue