fix gradle 3.0.0
This commit is contained in:
parent
3ad55accb4
commit
46ba3540da
3 changed files with 16 additions and 10 deletions
|
|
@ -4,12 +4,12 @@ import com.android.build.OutputFile
|
|||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.2"
|
||||
buildToolsVersion "26.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
versionCode 209
|
||||
versionName "3.0.43"
|
||||
}
|
||||
|
|
@ -36,12 +36,10 @@ android {
|
|||
}
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def file = output.packageApplication.outputFile
|
||||
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)
|
||||
output.outputFileName = org.apache.commons.io.FilenameUtils.getExtension(android.defaultConfig.applicationId) + "-" + abi + "-" + android.defaultConfig.versionName + "-" + variant.buildType.name + ".apk"
|
||||
}
|
||||
}
|
||||
splits {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,12 @@ import android.content.SharedPreferences;
|
|||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.preference.ListPreference;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
|
@ -20,10 +22,12 @@ import android.support.v7.preference.PreferenceFragmentCompat;
|
|||
import android.support.v7.preference.PreferenceManager;
|
||||
import android.support.v7.preference.PreferenceScreen;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.github.axet.androidlibrary.widgets.SilencePreferenceCompat;
|
||||
import com.github.axet.androidlibrary.widgets.StoragePathPreferenceCompat;
|
||||
import com.github.axet.androidlibrary.widgets.ThemeUtils;
|
||||
import com.github.axet.audiolibrary.encoders.Factory;
|
||||
import com.github.axet.audiorecorder.R;
|
||||
import com.github.axet.audiorecorder.app.MainApplication;
|
||||
|
|
@ -50,6 +54,8 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
|||
|
||||
public static final String[] PERMISSIONS = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
|
||||
|
||||
Handler handler = new Handler();
|
||||
|
||||
public static <T> T[] removeElement(Class<T> c, T[] aa, int i) {
|
||||
List<T> ll = Arrays.asList(aa);
|
||||
ll = new ArrayList<>(ll);
|
||||
|
|
@ -186,6 +192,9 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
|||
RecordingService.stopService(this);
|
||||
}
|
||||
}
|
||||
if (key.equals(MainApplication.PREFERENCE_STORAGE)) {
|
||||
Storage.migrateLocalStorageDialog(this, handler, new Storage(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
classpath 'com.android.tools.build:gradle:3.0.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -16,11 +14,12 @@ allprojects {
|
|||
repositories {
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '3.5'
|
||||
gradleVersion = '4.2.1'
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue