Skip to content

Commit

Permalink
add beta to reflect and fix publishing (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewparmet committed May 12, 2024
1 parent 0fb44da commit 05975cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
distribution: corretto
java-version: 17
- name: Publish
run: publishAllPublicationsToMavenCentral publishPlugins --no-configuration-cache --no-stacktrace
run: ./gradlew publishAllPublicationsToMavenCentral publishPlugins --no-configuration-cache --no-stacktrace
env:
PGP_KEY: ${{ secrets.PGP_KEY }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ package protokt.v1.google.protobuf
import com.google.protobuf.Descriptors.FieldDescriptor
import com.google.protobuf.Descriptors.FieldDescriptor.Type
import com.google.protobuf.DynamicMessage
import protokt.v1.Beta
import protokt.v1.Bytes
import protokt.v1.Message

@Beta
fun Message.toDynamicMessage(context: RuntimeContext): DynamicMessage =
context.convertValue(this) as DynamicMessage

@Beta
fun Message.hasField(field: FieldDescriptor): Boolean {
val value = getField(field)

Expand All @@ -36,6 +39,7 @@ fun Message.hasField(field: FieldDescriptor): Boolean {
}
}

@Beta
fun Message.getField(field: FieldDescriptor) =
ProtoktReflect.getField(this, field)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import com.google.protobuf.UnknownFieldSet.Field
import com.google.protobuf.UnsafeByteOperations
import com.google.protobuf.WireFormat
import com.toasttab.protokt.v1.ProtoktProtos
import protokt.v1.Beta
import protokt.v1.Bytes
import protokt.v1.Converter
import protokt.v1.Enum
Expand All @@ -39,6 +40,7 @@ import protokt.v1.reflect.typeName
import kotlin.Any
import kotlin.reflect.full.findAnnotation

@Beta
class RuntimeContext internal constructor(
descriptors: Iterable<Descriptors.Descriptor>,
private val classLookup: ClassLookup
Expand Down

0 comments on commit 05975cd

Please sign in to comment.