2014-12-16 12:23:45 +01:00
|
|
|
apply plugin: 'java'
|
2015-11-26 11:27:16 +01:00
|
|
|
apply plugin: 'application'
|
2016-03-10 18:31:02 +01:00
|
|
|
mainClassName = "net.osmand.util.GeoPointParserUtil"
|
Added default encoding for Java source code
On Windows 10 x64 Russian with Java 8.0.1210.13 compiler uses cyrillic encoding "cp1251" by default. That's why gradle fails with error
```
Validating translations
Incremental java compilation is an incubating feature.
:OsmAnd-java:compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.7
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\data\MapObject.java:26: error: unmappable character for encoding Cp1251
* Looks like: {ru=МоÑква, dz=à½?ོསི་ཀོ...} and does not contain values of OSM tags "name" and "name:en",
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:98: error: unmappable character for encoding Cp1251
String s = "Ú¯Ú† Ù¾Ú? نمکی باللغة العربي";
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:101: error: unmappable character for encoding Cp1251
if (!reshape.equals("ï»²ïº‘ïº®ï»Œï»Ÿïº ïº”ï»ï» ﻟﺎﺑ ﯽﮑﻤﻧ ﮋï? ï»ï®”")) {
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: unclosed character literal
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: ';' expected
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: unclosed character literal
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: unclosed character literal
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: illegal character: '\u201c'
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: ';' expected
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: unclosed character literal
char[] c = new char[] {'×', 'ד','×'} ;
^
E:\projects\Android\osmand_project\osmandapp\android\OsmAnd-java\src\net\osmand\Reshaper.java:89: error: not a statement
char[] c = new char[] {'×', 'ד','×'} ;
^
8 errors
1 warning
FAILED
FAILURE: Build failed with an exception.
```
I've added expllicit encoding setting for Java compiler.
2017-04-11 17:44:03 +02:00
|
|
|
compileJava.options.encoding = 'UTF-8'
|
2016-06-29 20:23:33 +02:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
sourceCompatibility = "1.7"
|
|
|
|
targetCompatibility = "1.7"
|
|
|
|
}
|
|
|
|
|
2015-02-02 16:54:43 +01:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
2015-02-03 10:13:11 +01:00
|
|
|
srcDirs = ["src"]
|
2015-02-02 16:54:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-03 10:13:11 +01:00
|
|
|
configurations {
|
|
|
|
android
|
|
|
|
}
|
|
|
|
|
|
|
|
task androidJar(type: Jar) {
|
|
|
|
appendix = "android"
|
|
|
|
from sourceSets.main.output
|
|
|
|
exclude("**/PlatformUtil.*")
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
android androidJar
|
2014-12-16 12:23:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2015-02-02 16:54:43 +01:00
|
|
|
compile fileTree(dir: "libs", include: ["*.jar"])
|
2014-12-16 12:23:45 +01:00
|
|
|
}
|
2016-06-29 20:23:33 +02:00
|
|
|
|