Skip to content

Commit

Permalink
Incremented target sdk version, gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Corwin-Kh committed Jul 15, 2024
1 parent 72ecc9f commit 8503cbb
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 43 deletions.
25 changes: 20 additions & 5 deletions OsmAnd-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ apply plugin: 'ivy-publish'


android {
compileSdk 33
buildToolsVersion = "33.0.2"
compileSdk 34
buildToolsVersion = "34.0.0"

defaultConfig {
minSdkVersion 14
targetSdkVersion 33
targetSdkVersion 34
versionCode 2
versionName "2.0"
namespace = "net.osmand.aidlapi"
}
lintOptions {
abortOnError false
Expand All @@ -22,12 +23,26 @@ android {
java.srcDirs = ["src"]
}
}
buildFeatures {
aidl true
}
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}

singleVariant('debug') {
withSourcesJar()
withJavadocJar()
}
}
}

version = System.getenv("OSMAND_BINARIES_IVY_REVISION") ?: "master-snapshot"
afterEvaluate {
publishing {
repositories {
repositories {
ivy {
url = System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./"
}
Expand Down Expand Up @@ -56,7 +71,7 @@ dependencies {
}

task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

Expand Down
6 changes: 3 additions & 3 deletions OsmAnd-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ task androidJar(type: Jar) {
} else {
dependsOn build
}
appendix = "android"
from (sourceSets.main.java.outputDir) {
archiveAppendix = "android"
from (sourceSets.main.java.classesDirectory) {
exclude("**/PlatformUtil.*")
}
from sourceSets.main.resources
Expand Down Expand Up @@ -117,7 +117,7 @@ publishing {
}
ivyJava(IvyPublication) {
artifact androidJar {
classifier 'android'
archiveClassifier = 'android'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion OsmAnd-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ kotlin {

android {
namespace = "net.osmand.shared"
compileSdk = 33
compileSdk = 34
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down
35 changes: 32 additions & 3 deletions OsmAnd-telegram/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'


java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

android {
compileSdk 33
buildToolsVersion = "33.0.2"
compileSdk 34
buildToolsVersion = "34.0.0"

namespace = "net.osmand.telegram"

sourceSets {
main {
Expand All @@ -22,7 +31,7 @@ android {
defaultConfig {
applicationId "net.osmand.telegram"
minSdkVersion 15
targetSdkVersion 33
targetSdkVersion 34
multiDexEnabled true
versionCode 1
versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode
Expand Down Expand Up @@ -92,6 +101,26 @@ android {
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
buildFeatures {
aidl true
}

applicationVariants.configureEach {
def variant = it
def taskName = variant.name.capitalize()
def mergeAssetsTaskName = "merge${taskName}Assets"
def osmandTask = tasks.findByName(mergeAssetsTaskName)
if (osmandTask != null) {
println(osmandTask.getName())
osmandTask.dependsOn(collectFonts)
}
def mapSourceSetPathsName= "map${taskName}SourceSetPaths"
osmandTask = tasks.findByName(mapSourceSetPathsName)
if(osmandTask != null) {
println(osmandTask.getName())
}
}

}

task downloadTdLibzip {
Expand Down
53 changes: 37 additions & 16 deletions OsmAnd/build-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ task printc {
}

android {
compileSdk 34
buildToolsVersion = "34.0.0"
// compileNdkVersion "android-ndk-r17b"

defaultConfig {
targetSdkVersion 33
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileSdk 34
buildToolsVersion = "34.0.0"
// compileNdkVersion "android-ndk-r17b"
namespace = "net.osmand.plus"
defaultConfig {
targetSdkVersion 34
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}

lintOptions {
abortOnError false
Expand Down Expand Up @@ -97,13 +99,32 @@ android {
}
}

buildTypes {
debug {
debuggable true
}
release {
debuggable false
buildTypes {
debug {
debuggable true
}
release {
debuggable false
}
}

applicationVariants.configureEach {
def variant = it
def taskName = variant.name.capitalize()
def mergeAssetsTaskName = "merge${taskName}Assets"
def osmandTask = tasks.findByName(mergeAssetsTaskName)
if (osmandTask != null) {
println(osmandTask.getName())
osmandTask.dependsOn(copyProjDb)
osmandTask.dependsOn(collectFonts)
osmandTask.dependsOn(copyPoiCategories)
}
def mapSourceSetPathsName= "map${taskName}SourceSetPaths"
osmandTask = tasks.findByName(mapSourceSetPathsName)
if(osmandTask != null) {
println(osmandTask.getName())
osmandTask.dependsOn(copyMapShaderIcons)
}
}
}

Expand Down
40 changes: 40 additions & 0 deletions OsmAnd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ apply plugin: 'kotlin-android'
// </patternset>
// </unzip>
// Less important
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

android {
signingConfigs {
Expand Down Expand Up @@ -105,6 +110,10 @@ android {
}

flavorDimensions "version", "coreversion", "abi"
buildFeatures {
renderScript true
aidl true
}
productFlavors {
// Version
nightlyFree {
Expand Down Expand Up @@ -170,6 +179,37 @@ android {
}
}

applicationVariants.configureEach {
def variant = it
def taskName = variant.name.capitalize()
def mergeAssetsTaskName = "merge${taskName}Assets"
def osmandTask = tasks.findByName(mergeAssetsTaskName)
if (osmandTask != null) {
println(osmandTask.getName())
osmandTask.dependsOn(collectHelpContentsStyle)
osmandTask.dependsOn(copyColorPalettes)
osmandTask.dependsOn(copy3DModels)
osmandTask.dependsOn(collectUiFonts)
osmandTask.dependsOn(collectVoiceAssets)
osmandTask.dependsOn(downloadWorldMiniBasemap)
}
def mapSourceSetPathsName= "map${taskName}SourceSetPaths"
osmandTask = tasks.findByName(mapSourceSetPathsName)
if(osmandTask != null) {
println(osmandTask.getName())
osmandTask.dependsOn(copyMapPOIIcons)
osmandTask.dependsOn(copyLargePOIIcons)
}
def mergeResources= "merge${taskName}Resources"
osmandTask = tasks.findByName(mergeResources)
if(osmandTask != null) {
println(osmandTask.getName())
osmandTask.dependsOn(copyMapShaderIcons)
osmandTask.dependsOn(copyMapPOIIcons)
osmandTask.dependsOn(copyLargePOIIcons)
}
}

}

afterEvaluate {
Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
buildscript {
ext {
agp_version = '8.2'
}
ext.kotlin_version = '1.9.23'
repositories {
google()
Expand All @@ -8,9 +11,8 @@ buildscript {
}
}
dependencies {
//classpath 'com.android.tools.build:gradle:2.+'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath("com.squareup.sqldelight:gradle-plugin:1.5.5")
if (gradle.startParameter.taskNames.toString().toLowerCase().contains("huawei")) {
Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
# UPDATE 3: Turn on D8 to recover builds with new gradle 6.5 and pluigin 4.1.1
#android.enableD8=false
android.enableJetifier=true
android.useAndroidX=true
android.useAndroidX=true
android.enableR8.fullMode=false
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Mon Jul 15 15:30:46 EEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 8 additions & 3 deletions plugins/Osmand-Nautical/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
apply plugin: 'com.android.application'

android {
compileSdk 33
buildToolsVersion = "33.0.2"
compileSdk 34
buildToolsVersion = "34.0.0"

namespace = "net.osmand.nauticalPlugin"
signingConfigs {
development {
storeFile file("../../keystores/debug.keystore")
Expand All @@ -21,7 +22,7 @@ android {

defaultConfig {
minSdkVersion 15
targetSdkVersion 33
targetSdkVersion 34
}

lintOptions {
Expand Down Expand Up @@ -50,6 +51,10 @@ android {
signingConfig signingConfigs.release
}
}
buildFeatures {
renderScript true
aidl true
}
}

repositories {
Expand Down
12 changes: 9 additions & 3 deletions plugins/Osmand-SRTMPlugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
apply plugin: 'com.android.application'

android {
compileSdk 33
buildToolsVersion = "33.0.2"
compileSdk 34
buildToolsVersion = "34.0.0"

namespace = "net.osmand.srtmPlugin.paid"

signingConfigs {
development {
Expand All @@ -22,7 +24,7 @@ android {

defaultConfig {
minSdkVersion 15
targetSdkVersion 33
targetSdkVersion 34
}

lintOptions {
Expand Down Expand Up @@ -50,6 +52,10 @@ android {
signingConfig signingConfigs.release
}
}
buildFeatures {
renderScript true
aidl true
}
}

repositories {
Expand Down
Loading

0 comments on commit 8503cbb

Please sign in to comment.