Skip to content

Commit e74f48a

Browse files
committed
create subproject for embedded photon
1 parent 447e0bd commit e74f48a

8 files changed

+21
-58
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
target/
22
photon_data/
33
dependency-reduced-pom.xml
4+
.gradle/
5+
app/*/build
46

57
.idea/
68
*.iml

build.gradle app/es_embedded/build.gradle

+17-58
Original file line numberDiff line numberDiff line change
@@ -3,85 +3,42 @@ plugins {
33
id 'application'
44
}
55

6-
group = 'de.komoot.photon'
7-
version = '0.5.0'
6+
apply from: rootProject.file('buildSrc/shared.gradle')
87

9-
description = "Geocoder for OSM data"
10-
11-
distZip.enabled = false
12-
distTar.enabled = false
13-
shadowDistZip.enabled = false
14-
shadowDistTar.enabled = false
15-
16-
application {
17-
mainClass = 'de.komoot.photon.App';
18-
}
19-
20-
java {
21-
sourceCompatibility = JavaVersion.VERSION_11
22-
targetCompatibility = JavaVersion.VERSION_11
23-
}
24-
25-
repositories {
26-
maven { url "https://www.datanucleus.org/downloads/maven2/" }
27-
mavenCentral()
28-
}
29-
30-
configurations {
31-
runtimePlugins.extendsFrom runtimeOnly {
32-
canBeResolved = true
33-
}
34-
}
8+
description = "Geocoder for OSM data (ElasticSearch-based version)"
359

3610
sourceSets {
3711
main {
3812
resources {
39-
srcDir 'build/es'
4013
srcDir 'es'
14+
srcDir 'build/es'
15+
}
16+
}
17+
test {
18+
java {
19+
srcDir 'src/test/java'
4120
}
4221
}
4322
}
4423

45-
dependencies {
46-
implementation('org.elasticsearch:elasticsearch:5.6.16') {
47-
exclude(module: 'log4j-api')
24+
configurations {
25+
runtimePlugins.extendsFrom runtimeOnly {
26+
canBeResolved = true
4827
}
28+
}
29+
30+
dependencies {
31+
implementation 'org.elasticsearch:elasticsearch:5.6.16'
4932
implementation 'org.elasticsearch.plugin:transport-netty4-client:5.6.16'
50-
implementation 'org.apache.logging.log4j:log4j-core:2.23.1'
51-
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
5233
implementation('org.elasticsearch.client:transport:5.6.16') {
5334
exclude(module: 'commons-logging')
5435
}
55-
implementation 'org.postgresql:postgresql:42.7.2'
56-
implementation 'org.slf4j:slf4j-api:2.0.13'
57-
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.23.1'
58-
implementation 'com.beust:jcommander:1.82'
59-
implementation 'org.apache.commons:commons-lang3:3.14.0'
60-
implementation 'org.springframework:spring-jdbc:5.3.32'
61-
implementation('org.apache.commons:commons-dbcp2:2.12.0') {
62-
exclude(module: 'commons-logging')
63-
}
64-
implementation 'org.locationtech.jts:jts-core:1.19.0'
65-
implementation 'com.sparkjava:spark-core:2.9.4'
66-
implementation 'net.postgis:postgis-jdbc:2023.1.0'
67-
implementation 'org.json:json:20240303'
68-
69-
testImplementation(platform("org.junit:junit-bom:5.10.2"))
70-
testImplementation 'com.h2database:h2:2.2.224'
71-
testImplementation 'org.junit.jupiter:junit-jupiter'
72-
testImplementation 'org.mockito:mockito-core:5.11.0'
73-
74-
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
7536

7637
runtimePlugins 'org.codelibs.elasticsearch.module:lang-painless:5.6.16'
7738
runtimePlugins 'org.ow2.asm:asm-debug-all:5.1'
7839
runtimePlugins 'org.antlr:antlr4-runtime:4.5.1-1'
7940
}
8041

81-
tasks.named('test') {
82-
useJUnitPlatform()
83-
}
84-
8542
task copyLibs(type: Copy){
8643
from configurations.runtimePlugins {
8744
into layout.buildDirectory.dir('es/modules/lang-painless')
@@ -100,6 +57,8 @@ tasks.named('processResources') {
10057

10158
shadowJar {
10259
mergeServiceFiles()
60+
destinationDirectory.set(rootProject.file('target'))
61+
archiveBaseName.set('photon')
10362
archiveClassifier.set('')
10463

10564
exclude '**/module-info.class'
File renamed without changes.
File renamed without changes.
File renamed without changes.

settings.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
rootProject.name = 'photon'
2+
3+
include ':app:es_embedded'

0 commit comments

Comments
 (0)