Skip to content

Commit

Permalink
chore: update gradle
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Moussa <ahmed.moussa@iohk.io>
  • Loading branch information
hamada147 committed Mar 2, 2024
1 parent f9f2624 commit e041f35
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
31 changes: 13 additions & 18 deletions anoncred-kmm/anoncreds-kmp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val os: OperatingSystem = OperatingSystem.current()

plugins {
kotlin("multiplatform")
id("com.android.library")
kotlin("multiplatform")
id("maven-publish")
}

apply(plugin = "kotlinx-atomicfu")
version = "0.4.3"
version = "0.4.4"
group = "io.iohk.atala.prism.anoncredskmp"

fun KotlinNativeCompilation.anoncredsCinterops(type: String) {
Expand All @@ -20,8 +20,7 @@ fun KotlinNativeCompilation.anoncredsCinterops(type: String) {
val crate = this.name
packageName("$crate.cinterop")
header(
buildDir
.resolve("generated")
project.layout.buildDirectory.asFile.get()
.resolve("nativeInterop")
.resolve("cinterop")
.resolve("headers")
Expand Down Expand Up @@ -84,6 +83,9 @@ kotlin {
}
androidTarget {
publishAllLibraryVariants()
compilations.all {
kotlinOptions.jvmTarget = "11"
}
}

// if (os.isMacOsX) {
Expand Down Expand Up @@ -140,7 +142,7 @@ kotlin {

sourceSets {
val commonMain by getting {
val generatedDir = buildDir
val generatedDir = project.layout.buildDirectory.asFile.get()
.resolve("generated")
.resolve("commonMain")
.resolve("kotlin")
Expand All @@ -157,12 +159,12 @@ kotlin {
}
}
val jvmMain by getting {
val generatedDir = buildDir
val generatedDir = project.layout.buildDirectory.asFile.get()
.resolve("generated")
.resolve("jvmMain")
.resolve("kotlin")
kotlin.srcDir(generatedDir)
val generatedResources = buildDir
val generatedResources = project.layout.buildDirectory.asFile.get()
.resolve("generatedResources")
.resolve("jvm")
.resolve("main")
Expand All @@ -173,12 +175,12 @@ kotlin {
}
val jvmTest by getting
val androidMain by getting {
val generatedDir = buildDir
val generatedDir = project.layout.buildDirectory.asFile.get()
.resolve("generated")
.resolve("androidMain")
.resolve("kotlin")
kotlin.srcDir(generatedDir)
val generatedResources = buildDir
val generatedResources = project.layout.buildDirectory.asFile.get()
.resolve("generatedResources")
.resolve("android")
.resolve("main")
Expand Down Expand Up @@ -241,14 +243,14 @@ publishing {

android {
ndkVersion = "26.0.10792818"
compileSdk = 33
compileSdk = 34
namespace = "io.iohk.atala.prism.anoncredskmp"
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

sourceSets["main"].jniLibs {
setSrcDirs(
listOf(
buildDir
project.layout.buildDirectory.asFile.get()
.resolve("generatedResources")
.resolve("android")
.resolve("main")
Expand All @@ -258,7 +260,6 @@ android {
}
defaultConfig {
minSdk = 21
targetSdk = 32
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -286,10 +287,4 @@ afterEvaluate {
tasks.withType<ProcessResources> {
dependsOn(":anoncred-wrapper-rust:buildRust")
}
tasks.named("lintAnalyzeDebug") {
this.enabled = false
}
tasks.named("lintAnalyzeRelease") {
this.enabled = false
}
}
8 changes: 4 additions & 4 deletions anoncred-kmm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("org.jlleitschuh.gradle.ktlint") version "11.6.0"
kotlin("jvm") version "1.8.20"
kotlin("jvm") version "1.9.22"
id("com.android.library") version "8.1.4" apply false
}

buildscript {
Expand All @@ -11,8 +12,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
classpath("com.android.tools.build:gradle:7.2.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22")
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.21.0")
}
}
Expand Down Expand Up @@ -47,7 +47,7 @@ subprojects {
exclude("**/generated/**")
exclude { projectDir.toURI().relativize(it.file.toURI()).path.contains("/generated/") }
exclude { element -> element.file.path.contains("generated/") }
exclude { it.file.path.contains("$buildDir/generated/") }
exclude("${project.layout.buildDirectory.asFile.get()}/generated/")
exclude { it.file.path.contains(layout.buildDirectory.dir("generated").get().toString()) }
}
}
Expand Down
2 changes: 1 addition & 1 deletion anoncred-kmm/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit e041f35

Please sign in to comment.