OsmAnd/OsmAnd-java/build.gradle

113 lines
2.7 KiB
Groovy
Raw Normal View History

2018-06-15 15:17:35 +02:00
apply plugin: 'java'
2019-04-26 12:20:02 +02:00
apply plugin: 'maven-publish'
2018-06-15 15:17:35 +02:00
2015-02-03 10:13:11 +01:00
configurations {
android
}
2018-06-15 17:27:36 +02:00
tasks.withType(JavaCompile) {
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
options.encoding = 'UTF-8'
2018-06-15 17:27:36 +02:00
}
2018-06-15 16:51:43 +02:00
task collectRoutingResources(type: Sync) {
from "../../resources/routing"
into "src/main/resources/net/osmand/router"
include "*.xml"
}
task collectMiscResources(type: Copy) {
into "src/main/resources/net/osmand/osm"
from("../../resources/obf_creation") {
include "rendering_types.xml"
}
from("../../resources/poi") {
include "poi_types.xml"
}
}
task collectRenderingStylesResources(type: Sync) {
from "../../resources/rendering_styles"
into "src/main/resources/net/osmand/render"
include "*.xml"
}
task collectRegionsInfoResources(type: Copy) {
from "../../resources/countries-info"
into "src/main/resources/net/osmand/map"
include "regions.ocbf"
}
task collectTestResources(type: Copy) {
2018-06-15 17:27:36 +02:00
into "src/test/resources/"
2018-12-02 22:01:34 +01:00
from("../../resources/test-resources") {
include "*"
}
from("../../resources/poi") {
include "poi_types.xml"
include "/phrases/en/*"
//include "/phrases/ru/*"
}
2018-06-15 16:51:43 +02:00
}
task collectExternalResources {
dependsOn collectRoutingResources,
collectRenderingStylesResources,
collectRegionsInfoResources,
collectTestResources,
collectMiscResources
}
2015-02-03 10:13:11 +01:00
task androidJar(type: Jar) {
2019-06-11 10:37:29 +02:00
if (!project.hasProperty('osmandCoreSimple')) {
dependsOn collectExternalResources, build
} else {
dependsOn build
}
2015-02-03 10:13:11 +01:00
appendix = "android"
2018-06-15 17:27:36 +02:00
from (sourceSets.main.java.outputDir) {
2018-06-15 16:51:43 +02:00
exclude("**/PlatformUtil.*")
}
from sourceSets.main.resources
2015-02-03 10:13:11 +01:00
}
2018-06-15 17:38:32 +02:00
compileJava {
2019-06-11 10:33:04 +02:00
if (!project.hasProperty('osmandCoreSimple')) {
dependsOn collectExternalResources
}
2018-06-15 17:38:32 +02:00
}
2018-06-15 16:51:43 +02:00
2015-02-03 10:13:11 +01:00
artifacts {
android androidJar
2014-12-16 12:23:45 +01:00
}
2019-04-26 12:20:02 +02:00
publishing {
publications {
maven(MavenPublication) {
artifactId "osmand-base"
from components.java
}
}
}
2018-06-15 16:51:43 +02:00
2014-12-16 12:23:45 +01:00
dependencies {
2018-06-15 14:54:55 +02:00
testImplementation 'junit:junit:4.12'
testImplementation 'com.google.code.gson:gson:2.8.2'
testImplementation 'org.hamcrest:hamcrest-core:1.3'
2019-02-20 09:25:50 +01:00
implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
implementation group: 'org.json', name: 'json', version: '20171018'
2018-06-15 16:51:56 +02:00
implementation 'it.unibo.alice.tuprolog:tuprolog:3.2.1'
implementation 'org.beanshell:bsh-core:2.0b4'
implementation 'org.apache.commons:commons-compress:1.17'
implementation 'com.moparisthebest:junidecode:0.1.1'
implementation 'com.vividsolutions:jts-core:1.14.0'
2019-08-05 20:59:01 +02:00
implementation 'com.google.openlocationcode:openlocationcode:1.0.4'
2019-02-21 12:16:25 +01:00
// turn off for now
//implementation 'com.atilika.kuromoji:kuromoji-ipadic:0.9.0'
2018-06-15 16:51:56 +02:00
implementation 'net.sf.kxml:kxml2:2.1.8'
2019-02-18 17:03:51 +01:00
implementation fileTree(include: ['*.jar'], dir: 'libs')
2014-12-16 12:23:45 +01:00
}
2016-06-29 20:23:33 +02:00