Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,31 @@ jobs:
./gradlew publishToMavenLocal --stacktrace --show-version --no-configuration-cache
./gradlew -p gradle-plugin publishToMavenLocal --stacktrace --show-version --no-configuration-cache

publish-pr72-snapshot:
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.number == 72 && github.head_ref == 'tomm/use-scoped-contribution-hints' && github.repository == 'square/metro-extensions' }}
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup
uses: ./.github/actions/setup-action
with:
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Publish PR72 Kotlin 2.3.21 snapshot
run: |
./gradlew clean publish -Pkotlin.version=2.3.21 -PRELEASE_SIGNING_ENABLED=true --no-build-cache --stacktrace --show-version --no-configuration-cache
./gradlew -p gradle-plugin clean publish -Pkotlin.version=2.3.21 -PRELEASE_SIGNING_ENABLED=true --no-build-cache --stacktrace --show-version --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}

build-logic:
runs-on: ubuntu-latest
timeout-minutes: 25
Expand Down
11 changes: 0 additions & 11 deletions compiler/api/compiler.api
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ public final class com/squareup/metro/extensions/scoped/ContributesMultibindingS
public fun create (Lorg/jetbrains/kotlin/fir/FirSession;Ldev/zacsweers/metro/compiler/MetroOptions;Ldev/zacsweers/metro/compiler/compat/CompatContext;)Ldev/zacsweers/metro/compiler/api/fir/MetroFirDeclarationGenerationExtension;
}

public final class com/squareup/metro/extensions/scoped/ContributesMultibindingScopedMetroExtension : dev/zacsweers/metro/compiler/api/fir/MetroContributionExtension {
public fun <init> (Lorg/jetbrains/kotlin/fir/FirSession;)V
public fun getContributions (Lorg/jetbrains/kotlin/name/ClassId;Ldev/zacsweers/metro/compiler/fir/MetroFirTypeResolver$Factory;)Ljava/util/List;
public fun registerPredicates (Lorg/jetbrains/kotlin/fir/extensions/FirDeclarationPredicateRegistrar;)V
}

public final class com/squareup/metro/extensions/scoped/ContributesMultibindingScopedMetroExtension$Factory : dev/zacsweers/metro/compiler/api/fir/MetroContributionExtension$Factory {
public fun <init> ()V
public fun create (Lorg/jetbrains/kotlin/fir/FirSession;Ldev/zacsweers/metro/compiler/MetroOptions;Ldev/zacsweers/metro/compiler/compat/CompatContext;)Ldev/zacsweers/metro/compiler/api/fir/MetroContributionExtension;
}

public final class com/squareup/metro/extensions/service/ContributesServiceFir : dev/zacsweers/metro/compiler/api/fir/MetroFirDeclarationGenerationExtension {
public fun <init> (Lorg/jetbrains/kotlin/fir/FirSession;)V
public fun generateConstructors (Lorg/jetbrains/kotlin/fir/extensions/DeclarationGenerationContext$Member;)Ljava/util/List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import org.jetbrains.kotlin.name.Name
/**
* Shared identifiers for the `@ContributesMultibindingScoped` compiler plugin support.
*
* Used by both:
* - [ContributesMultibindingScopedFir] (FIR generator that creates the contribution interface)
* - [ContributesMultibindingScopedMetroExtension] (Metro extension that bridges predicate gap)
* Used by [ContributesMultibindingScopedFir] to create scoped binding containers and contribution
* hints.
*/
internal object ContributesMultibindingScopedIds {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.squareup.metro.extensions.services

import java.io.File
import kotlin.time.Duration
import org.jetbrains.kotlin.test.services.AssertionsService
import org.jetbrains.kotlin.test.services.JUnit5Assertions

Expand Down Expand Up @@ -104,6 +105,14 @@ object FileSortingAssertionsService : AssertionsService() {

override fun assertAll(conditions: List<() -> Unit>) = delegate.assertAll(conditions)

override fun assertTimeoutPreemptively(
timeout: Duration,
message: () -> String,
action: () -> Unit,
) {
delegate.assertTimeoutPreemptively(timeout, message, action)
}

override fun assertNotNull(value: Any?, message: (() -> String)?) {
delegate.assertNotNull(value, message ?: { "" })
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=0.0.12-SNAPSHOT
VERSION_NAME=0.0.12-pr72-5d5d96f-k2321-SNAPSHOT
GROUP=com.squareup.metro.extensions

org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
autoservice = "0.1.4"
autoservice = "0.1.5"
binary-compat-validator = "0.18.1"
buildconfig = "6.0.9"
jdk = "21"
kotlin = "2.3.21"
ktfmt = "0.26.0"
maven-publish = "0.36.0"
metro = "1.1.1"
metro = "1.2.0"

[libraries]
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
Expand Down
Loading