Skip to content

Commit

Permalink
Remove circuit submodule, use GPR snapshot version
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesanson committed Nov 16, 2023
1 parent e9b9694 commit 1cb7b16
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 23 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand All @@ -25,11 +23,6 @@ jobs:
with:
cache-disabled: true

# Temporary job to handle the publishing of Circuit from included submodule
- name: Publish circuit snapshot (temporary)
run: ./gradlew publishToMavenLocal
working-directory: ./circuit

- name: Lint
run: ./gradlew lint

Expand All @@ -39,8 +32,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand All @@ -53,12 +44,6 @@ jobs:
with:
cache-disabled: true


# Temporary job to handle the publishing of Circuit from included submodule
- name: Publish circuit snapshot (temporary)
run: ./gradlew publishToMavenLocal
working-directory: ./circuit

- name: Decrypt secrets
run: ./release/decrypt-secrets.sh
env:
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion circuit
Submodule circuit deleted from 741a6e
4 changes: 4 additions & 0 deletions common/screens/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import dev.sanson.buildlogic.configureRepositoriesForGithubPackages

plugins {
id("dev.sanson.android.library.core")
}

configureRepositoriesForGithubPackages()

android {
namespace = "dev.sanson.lightroom.screens"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package dev.sanson.buildlogic

val isCi get() = !System.getenv("CI").isNullOrEmpty()
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,36 @@ import com.google.devtools.ksp.gradle.KspExtension
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.repositories

// TODO(jamiesanson) - #3 - Revert once circuit hilt support lands
fun Project.configureRepositoriesForGithubPackages() {
repositories {
google()
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/jamiesanson/circuit")
if (isCi) {
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
} else {
credentials {
username = project.property("gpr.user") as String
password = project.property("gpr.key") as String
}
}
}
}
}

internal fun Project.configureCircuit(useHilt: Boolean = true) {
val libs = versionCatalog

// TODO(jamiesanson) - #3 - Revert once circuit hilt support lands
configureRepositoriesForGithubPackages()

with(pluginManager) {
if (!isKspPluginApplied(this@configureCircuit)) {
apply(Plugins.Ksp)
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ androidx-hilt-navigation-compose = "1.1.0"
androidx-lifecycle = "2.6.2"
androidx-work = "2.8.1"

circuit = "0.16.0-SNAPSHOT"
circuit = "0.17.0-SNAPSHOT"

coil = "2.4.0"
coil = "2.5.0"

compose-bom = "2023.10.01"
compose-compiler = "1.5.4"
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ pluginManagement {
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
// TODO(jamiesanson) - #3 - Revert once circuit hilt support lands
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
repositories {
google()
mavenCentral()
mavenLocal()
}
}

Expand Down

0 comments on commit 1cb7b16

Please sign in to comment.