Skip to content

Commit

Permalink
Merge pull request #6 from streetcomplete/master
Browse files Browse the repository at this point in the history
änderungen pullen
  • Loading branch information
qugebert authored Sep 27, 2023
2 parents 3a5932f + 3a5232a commit 25128cd
Show file tree
Hide file tree
Showing 580 changed files with 21,595 additions and 2,418 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/generate-quest-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: Generate quest list
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
19 changes: 10 additions & 9 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.Properties
plugins {
id("com.android.application")
kotlin("android")
kotlin("plugin.serialization") version "1.8.21"
kotlin("plugin.serialization") version "1.9.10"
}

android {
Expand Down Expand Up @@ -34,8 +34,8 @@ android {
applicationId = "de.westnordost.streetcomplete"
minSdk = 21
targetSdk = 33
versionCode = 5400
versionName = "54.0-beta1"
versionCode = 5402
versionName = "54.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down Expand Up @@ -63,6 +63,7 @@ android {

buildFeatures {
viewBinding = true
buildConfig = true
}

bundle {
Expand Down Expand Up @@ -101,6 +102,7 @@ configurations {
all {
// it's already included in Android
exclude(group = "net.sf.kxml", module = "kxml2")
exclude(group = "xmlpull", module = "xmlpull")
}
}

Expand All @@ -110,7 +112,6 @@ dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")

// tests
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:$mockitoVersion")
testImplementation("org.mockito:mockito-inline:$mockitoVersion")
testImplementation("org.assertj:assertj-core:3.23.1")
Expand Down Expand Up @@ -157,8 +158,8 @@ dependencies {
// finding a name for a feature without a name tag
implementation("de.westnordost:osmfeatures-android:5.2")
// talking with the OSM API
implementation("de.westnordost:osmapi-map:2.1")
implementation("de.westnordost:osmapi-changesets:2.1")
implementation("de.westnordost:osmapi-map:2.3")
implementation("de.westnordost:osmapi-changesets:2.3")
implementation("de.westnordost:osmapi-notes:2.0")
implementation("de.westnordost:osmapi-traces:2.0")
implementation("de.westnordost:osmapi-user:2.0")
Expand Down Expand Up @@ -193,14 +194,14 @@ dependencies {
/** Localizations that should be pulled from POEditor */
val bcp47ExportLanguages = setOf(
"am", "ar", "ast", "be", "bg", "bs", "ca", "cs", "da", "de", "el",
"en", "en-AU", "en-GB", "eo", "es", "eu", "fa", "fi", "fr", "gl", "hr", "hu", "hy",
"en", "en-AU", "en-GB", "eo", "es", "eu", "fa", "fi", "fr", "gl", "he", "hr", "hu", "hy",
"id", "it", "ja", "ko", "lt", "lv", "nb", "no", "nl", "nn", "pl", "pt", "pt-BR",
"ro", "ru", "sk", "sr-cyrl", "sr-latn", "sv", "sw", "th", "tr", "uk",
"ro", "ru", "sk", "sl", "sr-cyrl", "sr-latn", "sv", "sw", "th", "tr", "uk",
"zh", "zh-CN", "zh-HK", "zh-TW"
)

// see https://github.com/osmlab/name-suggestion-index/tags for latest version
val nsiVersion = "v6.0.20230816"
val nsiVersion = "v6.0.20230925"
// see https://github.com/openstreetmap/id-tagging-schema/releases for latest version
val presetsVersion = "v6.4.1"

Expand Down
8 changes: 0 additions & 8 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
-dontobfuscate

-dontwarn org.xmlpull.**
-dontnote org.xmlpull.**

# https://issuetracker.google.com/issues/37070898
-dontnote android.net.http.*
-dontnote org.apache.commons.codec.**
-dontnote org.apache.http.**

# tangram start ------------------------------------------------------------------------------------

# let's just keep everything
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ package de.westnordost.streetcomplete.data

import android.database.sqlite.SQLiteOpenHelper
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.After
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertNotNull

open class ApplicationDbTestCase {
protected lateinit var dbHelper: SQLiteOpenHelper
protected lateinit var database: Database

@Before fun setUpHelper() {
@BeforeTest fun setUpHelper() {
dbHelper = StreetCompleteSQLiteOpenHelper(
InstrumentationRegistry.getInstrumentation().targetContext,
DATABASE_NAME
Expand All @@ -20,10 +20,10 @@ open class ApplicationDbTestCase {
}

@Test fun databaseAvailable() {
Assert.assertNotNull(dbHelper.readableDatabase)
assertNotNull(dbHelper.readableDatabase)
}

@After fun tearDownHelper() {
@AfterTest fun tearDownHelper() {
dbHelper.close()
InstrumentationRegistry.getInstrumentation().targetContext
.deleteDatabase(DATABASE_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package de.westnordost.streetcomplete.data.download.tiles
import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder
import de.westnordost.streetcomplete.util.ktx.nowAsEpochMilliseconds
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue

class DownloadedTilesDaoTest : ApplicationDbTestCase() {
private lateinit var dao: DownloadedTilesDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = DownloadedTilesDao(database)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package de.westnordost.streetcomplete.data.meta

import androidx.test.platform.app.InstrumentationRegistry
import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.getWeekdayIndex
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertTrue

class CountryInfosTest {
private val validWeekdays = listOf("Mo", "Tu", "We", "Th", "Fr", "Sa", "Su")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package de.westnordost.streetcomplete.data.osm.created_elements
import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey
import de.westnordost.streetcomplete.data.osm.mapdata.ElementType
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue

class CreatedElementsDaoTest : ApplicationDbTestCase() {
private lateinit var dao: CreatedElementsDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = CreatedElementsDao(database)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey
import de.westnordost.streetcomplete.data.osm.mapdata.ElementType
import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test
import kotlin.test.*
import kotlin.test.BeforeTest
import kotlin.test.Test

class EditElementsDaoTest : ApplicationDbTestCase() {
private lateinit var dao: EditElementsDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = EditElementsDao(database)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry
import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement
import de.westnordost.streetcomplete.overlays.Overlay
import de.westnordost.streetcomplete.overlays.Style
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue

class ElementEditsDaoTest : ApplicationDbTestCase() {
private lateinit var dao: ElementEditsDao

@Before fun createDao() {
@BeforeTest fun createDao() {
val list = listOf(1 to TEST_QUEST_TYPE, 2 to TEST_QUEST_TYPE2)
val list2 = listOf(1 to TestOverlay)
dao = ElementEditsDao(database, QuestTypeRegistry(list), OverlayRegistry(list2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.data.osm.mapdata.ElementIdUpdate
import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey
import de.westnordost.streetcomplete.data.osm.mapdata.ElementType
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
import kotlin.test.assertTrue

class ElementIdProviderDaoTest : ApplicationDbTestCase() {
private lateinit var dao: ElementIdProviderDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = ElementIdProviderDao(database)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package de.westnordost.streetcomplete.data.osm.edits.upload.changesets

import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNull
import kotlin.test.assertTrue

class OpenChangesetsDaoTest : ApplicationDbTestCase() {
private lateinit var dao: OpenChangesetsDao
Expand All @@ -15,7 +15,7 @@ class OpenChangesetsDaoTest : ApplicationDbTestCase() {
private val P = "Brasliweks"
private val SOURCE = "test"

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = OpenChangesetsDao(database)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import de.westnordost.streetcomplete.data.osm.mapdata.LatLon
import de.westnordost.streetcomplete.data.osm.mapdata.Node
import de.westnordost.streetcomplete.data.osm.mapdata.NodeDao
import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue

class ElementGeometryDaoTest : ApplicationDbTestCase() {
private lateinit var dao: ElementGeometryDao
private lateinit var nodeDao: NodeDao

@Before fun createDao() {
@BeforeTest fun createDao() {
nodeDao = NodeDao(database)
val relationGeometryDao = RelationGeometryDao(database, PolylinesSerializer())
val wayGeometryDao = WayGeometryDao(database, PolylinesSerializer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.data.osm.mapdata.ElementType
import de.westnordost.streetcomplete.data.osm.mapdata.LatLon
import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue

class RelationGeometryDaoTest : ApplicationDbTestCase() {
private lateinit var dao: RelationGeometryDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = RelationGeometryDao(database, PolylinesSerializer())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.data.osm.mapdata.ElementType
import de.westnordost.streetcomplete.data.osm.mapdata.LatLon
import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue

class WayGeometryDaoTest : ApplicationDbTestCase() {
private lateinit var dao: WayGeometryDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = WayGeometryDao(database, PolylinesSerializer())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ package de.westnordost.streetcomplete.data.osm.mapdata
import de.westnordost.streetcomplete.data.ApplicationDbTestCase
import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder
import de.westnordost.streetcomplete.util.ktx.nowAsEpochMilliseconds
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue

class NodeDaoTest : ApplicationDbTestCase() {
private lateinit var dao: NodeDao

@Before fun createDao() {
@BeforeTest fun createDao() {
dao = NodeDao(database)
}

Expand Down
Loading

0 comments on commit 25128cd

Please sign in to comment.