Refactor packages
This commit is contained in:
parent
bd6ccd5510
commit
41300c96d9
3 changed files with 9 additions and 12 deletions
|
@ -5,7 +5,10 @@ configurations {
|
|||
android
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
sourceCompatibility = "1.7"
|
||||
targetCompatibility = "1.7"
|
||||
}
|
||||
|
||||
task collectRoutingResources(type: Sync) {
|
||||
from "../../resources/routing"
|
||||
|
@ -37,8 +40,7 @@ task collectRegionsInfoResources(type: Copy) {
|
|||
|
||||
task collectTestResources(type: Copy) {
|
||||
from "../../resources/test-resources"
|
||||
into "src/main/test/resources/"
|
||||
include "regions.ocbf"
|
||||
into "src/test/resources/"
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,9 +53,9 @@ task collectExternalResources {
|
|||
}
|
||||
|
||||
task androidJar(type: Jar) {
|
||||
dependsOn collectExternalResources
|
||||
dependsOn collectExternalResources, build
|
||||
appendix = "android"
|
||||
from(sourceSets.main.java.outputDir) {
|
||||
from (sourceSets.main.java.outputDir) {
|
||||
exclude("**/PlatformUtil.*")
|
||||
}
|
||||
from sourceSets.main.resources
|
||||
|
|
|
@ -67,7 +67,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import scala.collection.immutable.HashMap;
|
||||
|
||||
public class OsmandAidlApi {
|
||||
private static final Log LOG = PlatformUtil.getLog(OsmandAidlApi.class);
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.osmand.plus.api.SQLiteAPI.SQLiteConnection;
|
|||
import net.osmand.plus.api.SQLiteAPI.SQLiteCursor;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.tools.bzip2.CBZip2OutputStream;
|
||||
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -324,15 +324,11 @@ public class FavouritesDbHelper {
|
|||
private void backup(File backupFile, File externalFile) {
|
||||
try {
|
||||
File f = new File(backupFile.getParentFile(), backupFile.getName());
|
||||
FileOutputStream fout = new FileOutputStream(f);
|
||||
fout.write('B');
|
||||
fout.write('Z');
|
||||
CBZip2OutputStream out = new CBZip2OutputStream(fout);
|
||||
BZip2CompressorOutputStream out = new BZip2CompressorOutputStream( new FileOutputStream(f));
|
||||
FileInputStream fis = new FileInputStream(externalFile);
|
||||
Algorithms.streamCopy(fis, out);
|
||||
fis.close();
|
||||
out.close();
|
||||
fout.close();
|
||||
} catch (Exception e) {
|
||||
log.warn("Backup failed", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue