Skip to content

Commit

Permalink
try with dependency resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Funkatronics committed Jun 11, 2024
1 parent a244423 commit 9ac3c12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ plugins {
alias(libs.plugins.publish) apply false
}

configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.solanamobile:web3-core")).using(project(":core"))
substitute(module("com.solanamobile:web3-solana")).using(project(":solana"))
}
}

//tasks.register("clean", Delete::class) {
// delete(rootProject.buildDir)
//}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 4 additions & 2 deletions solana/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {

val artifactIdPrefix: String by project
val moduleArtifactId = "$artifactIdPrefix-solana"
val buildDir = layout.buildDirectory.asFile.get()
val generatedDir = "${buildDir}/generated/src/commonTest/kotlin"

kotlin {
jvmToolchain(11)
Expand Down Expand Up @@ -36,7 +38,7 @@ kotlin {
}
}
val commonTest by getting {
kotlin.srcDir(File("${buildDir}/generated/src/commonTest/kotlin"))
kotlin.srcDir(File(generatedDir))
dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
Expand All @@ -63,7 +65,7 @@ afterEvaluate {
val localRpcUrl = project.properties["testing.rpc.localUrl"]
if (useLocalValidator && localRpcUrl != null) rpcUrl = localRpcUrl

val dir = "${buildDir}/generated/src/commonTest/kotlin/com/solana/config"
val dir = "${generatedDir}/com/solana/config"
mkdir(dir)
File(dir, "TestConfig.kt").writeText(
"""
Expand Down

0 comments on commit 9ac3c12

Please sign in to comment.