Skip to content

Commit 8a50521

Browse files
committed
Use jacodb from GitHub Packages Registry
1 parent 06624d8 commit 8a50521

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object Versions {
66
const val clikt = "5.0.0"
77
const val detekt = "1.23.7"
88
const val ini4j = "0.5.4"
9-
const val jacodb = "5acbadfed0"
9+
const val jacodb = "20250731+081adc27"
1010
const val juliet = "1.3.2"
1111
const val junit = "5.9.3"
1212
const val kotlin = "2.1.0"
@@ -116,7 +116,8 @@ object Libs {
116116
)
117117

118118
// https://github.com/UnitTestBot/jacodb
119-
private const val jacodbPackage = "com.github.UnitTestBot.jacodb" // use "org.jacodb" with includeBuild
119+
// private const val jacodbPackage = "com.github.UnitTestBot.jacodb" // JitPack
120+
private const val jacodbPackage = "org.jacodb" // GitHub Packages Registry
120121
val jacodb_core = dep(
121122
group = jacodbPackage,
122123
name = "jacodb-core",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import org.gradle.api.Project
2+
import org.gradle.kotlin.dsl.maven
3+
import org.gradle.kotlin.dsl.repositories
4+
5+
/**
6+
* Set up GitHub Packages Registry for `jacodb`.
7+
*
8+
* To use this GPR locally, you need to set the `gpr.user` and `gpr.key` properties
9+
* in your `~/.gradle/gradle.properties` file, for example:
10+
* ```
11+
* gpr.user=your-github-username
12+
* gpr.key=your-github-token
13+
* ```
14+
* Note: token must have "packages: read" permissions.
15+
*
16+
* On CI, provide `GITHUB_ACTOR` and `GITHUB_TOKEN` environment variables.
17+
*/
18+
fun Project.setupJacodbGitHubPackagesRepository() {
19+
repositories {
20+
maven {
21+
url = uri("https://maven.pkg.github.com/UnitTestBot/jacodb")
22+
credentials {
23+
username = findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
24+
password = findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
25+
}
26+
}
27+
}
28+
}

buildSrc/src/main/kotlin/usvm.kotlin-conventions.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ repositories {
1414
maven("https://jitpack.io")
1515
}
1616

17+
setupJacodbGitHubPackagesRepository()
18+
1719
dependencies {
1820
// Align versions of all Kotlin components
1921
implementation(platform(kotlin("bom", Versions.kotlin)))

usvm-jvm/usvm-jvm-api/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ repositories {
3131
maven("https://jitpack.io")
3232
}
3333

34+
setupJacodbGitHubPackagesRepository()
35+
3436
dependencies {
3537
compileOnly(Libs.jacodb_api_jvm)
3638
}

0 commit comments

Comments
 (0)