// TODO: move to antora.yml once supported

// the following attributes must be updated immediately before a release

// pkl version corresponding to current git commit without -dev suffix or git hash
:pkl-version-no-suffix: 0.28.0
// tells whether pkl version corresponding to current git commit
// is a release version (:is-release-version: '') or dev version (:!is-release-version:)
:is-release-version: ''

// the remaining attributes do not need to be updated regularly

:pkl-version: {pkl-version-no-suffix}-dev
ifdef::is-release-version[]
:pkl-version: {pkl-version-no-suffix}
endif::[]

// use non-unique snapshot version because we have no way to determine unique snapshot version here
:pkl-artifact-version: {pkl-version-no-suffix}-SNAPSHOT
ifdef::is-release-version[]
:pkl-artifact-version: {pkl-version}
endif::[]

:uri-maven-docsite: https://central.sonatype.com

:uri-sonatype: https://s01.oss.sonatype.org/content/groups/public

:uri-maven-repo: https://s01.oss.sonatype.org/content/groups/public
ifdef::is-release-version[]
:uri-maven-repo: https://repo1.maven.org/maven2
endif::[]

:symbolic-version-name: latest
ifdef::is-release-version[]
:symbolic-version-name: current
endif::[]
:uri-pkl-docs-base: https://pkl-lang.org/package-docs
:uri-pkl-stdlib-docs-base: {uri-pkl-docs-base}/pkl
:uri-pkl-stdlib-docs: {uri-pkl-stdlib-docs-base}/{pkl-version}
:uri-pkl-stdlib-docs-index: {uri-pkl-stdlib-docs}/

:github-branch: main
ifdef::is-release-version[]
:github-branch: {pkl-version-no-suffix}
endif::[]
:uri-github-tree: https://github.com/apple/pkl/tree/{github-branch}
:uri-pkl-stdlib-sources: {uri-github-tree}/stdlib

:github-releases-base: https://github.com/apple/pkl/releases
:github-releases: {github-releases-base}/download/{pkl-artifact-version}

:uri-pkl-core-main-sources: {uri-github-tree}/pkl-core/src/main/java/org/pkl/core
:uri-pkl-cli-main-sources: {uri-github-tree}/pkl-cli/src/main/kotlin/org/pkl/cli
:uri-pkl-doc-main-sources: {uri-github-tree}/pkl-doc/src/main/kotlin/org/pkl/doc

// This attribute is used as language for Pkl code blocks.
// It can then be mapped to different languages in different environments (e.g., IntelliJ vs. Antora).
:pkl: pkl
:pkl-expr: pkl expression

:uri-pkl-examples-repo: https://github.com/apple/pkl-jvm-examples
:uri-pkl-examples-tree: {uri-pkl-examples-repo}/tree/main
:uri-build-eval-example: {uri-pkl-examples-tree}/build-eval
:uri-codegen-java-example: {uri-pkl-examples-tree}/codegen-java
:uri-codegen-kotlin-example: {uri-pkl-examples-tree}/codegen-kotlin
:uri-config-java-example: {uri-pkl-examples-tree}/config-java
:uri-config-kotlin-example: {uri-pkl-examples-tree}/config-kotlin
:uri-pkldoc-example: {uri-pkl-examples-tree}/pkldoc

:uri-stdlib-baseModule: {uri-pkl-stdlib-docs}/base
:uri-stdlib-analyzeModule: {uri-pkl-stdlib-docs}/analyze
:uri-stdlib-jsonnetModule: {uri-pkl-stdlib-docs}/jsonnet
:uri-stdlib-reflectModule: {uri-pkl-stdlib-docs}/reflect
:uri-stdlib-mathModule: {uri-pkl-stdlib-docs}/math
:uri-stdlib-xmlModule: {uri-pkl-stdlib-docs}/xml
:uri-stdlib-protobufModule: {uri-pkl-stdlib-docs}/protobuf
:uri-stdlib-evaluatorSettingsModule: {uri-pkl-stdlib-docs}/EvaluatorSettings
:uri-stdlib-Boolean: {uri-stdlib-baseModule}/Boolean
:uri-stdlib-xor: {uri-stdlib-baseModule}/Boolean#xor()
:uri-stdlib-implies: {uri-stdlib-baseModule}/Boolean#implies()
:uri-stdlib-Any: {uri-stdlib-baseModule}/Any
:uri-stdlib-String: {uri-stdlib-baseModule}/String
:uri-stdlib-StringToInt: {uri-stdlib-baseModule}/String#toInt()
:uri-stdlib-Int: {uri-stdlib-baseModule}/Int
:uri-stdlib-Float: {uri-stdlib-baseModule}/Float
:uri-stdlib-Number: {uri-stdlib-baseModule}/Number
:uri-stdlib-NaN: {uri-stdlib-baseModule}/#NaN
:uri-stdlib-Infinity: {uri-stdlib-baseModule}/#Infinity
:uri-stdlib-isBetween: {uri-stdlib-baseModule}/Number#isBetween
:uri-stdlib-isFinite: {uri-stdlib-baseModule}/Number#isFinite
:uri-stdlib-Int8: {uri-stdlib-baseModule}/#Int8
:uri-stdlib-Int16: {uri-stdlib-baseModule}/#Int16
:uri-stdlib-Int32: {uri-stdlib-baseModule}/#Int32
:uri-stdlib-UInt8: {uri-stdlib-baseModule}/#UInt8
:uri-stdlib-UInt16: {uri-stdlib-baseModule}/#UInt16
:uri-stdlib-UInt32: {uri-stdlib-baseModule}/#UInt32
:uri-stdlib-UInt: {uri-stdlib-baseModule}/#UInt
:uri-stdlib-Uri: {uri-stdlib-baseModule}/#Uri
:uri-stdlib-matches: {uri-stdlib-baseModule}/String#matches()
:uri-stdlib-Null: {uri-stdlib-baseModule}/Null
:uri-stdlib-ifNonNull: {uri-stdlib-baseModule}/Null#ifNonNull()
:uri-stdlib-List: {uri-stdlib-baseModule}/List
:uri-stdlib-Set: {uri-stdlib-baseModule}/Set
:uri-stdlib-Map: {uri-stdlib-baseModule}/Map
:uri-stdlib-Listing: {uri-stdlib-baseModule}/Listing
:uri-stdlib-Listing-default: {uri-stdlib-baseModule}/Listing#default
:uri-stdlib-Listing-isDistinct: {uri-stdlib-baseModule}/Listing#isDistinct
:uri-stdlib-Listing-isDistinctBy: {uri-stdlib-baseModule}/Listing#isDistinctBy()
:uri-stdlib-Mapping: {uri-stdlib-baseModule}/Mapping
:uri-stdlib-Mapping-default: {uri-stdlib-baseModule}/Mapping#default
:uri-stdlib-Duration: {uri-stdlib-baseModule}/Duration
:uri-stdlib-Duration-value: {uri-stdlib-baseModule}/Duration#value
:uri-stdlib-Duration-unit: {uri-stdlib-baseModule}/Duration#unit
:uri-stdlib-DurationUnit: {uri-stdlib-baseModule}/#DurationUnit
:uri-stdlib-DataSize: {uri-stdlib-baseModule}/DataSize
:uri-stdlib-DataSize-value: {uri-stdlib-baseModule}/DataSize#value
:uri-stdlib-DataSize-unit: {uri-stdlib-baseModule}/DataSize#unit
:uri-stdlib-DataSizeUnit: {uri-stdlib-baseModule}/#DataSizeUnit
:uri-stdlib-Dynamic: {uri-stdlib-baseModule}/Dynamic
:uri-stdlib-Dynamic-toTyped: {uri-stdlib-baseModule}/Dynamic#toTyped()
:uri-stdlib-Typed: {uri-stdlib-baseModule}/Typed
:uri-stdlib-Regex: {uri-stdlib-baseModule}/Regex
:uri-stdlib-Regex-method: {uri-stdlib-baseModule}/#Regex()
:uri-stdlib-Regex-match: {uri-stdlib-baseModule}/Regex#match
:uri-stdlib-RegexMatch: {uri-stdlib-baseModule}/RegexMatch
:uri-stdlib-Pair: {uri-stdlib-baseModule}/Pair
:uri-stdlib-IntSeq: {uri-stdlib-baseModule}/IntSeq
:uri-stdlib-Class: {uri-stdlib-baseModule}/Class
:uri-stdlib-TypeAlias: {uri-stdlib-baseModule}/TypeAlias
:uri-stdlib-Deprecated: {uri-stdlib-baseModule}/Deprecated
:uri-stdlib-ValueRenderer: {uri-stdlib-baseModule}/ValueRenderer
:uri-stdlib-PcfRenderer-converters: {uri-stdlib-baseModule}/PcfRenderer#converters
:uri-stdlib-Function: {uri-stdlib-baseModule}/Function
:uri-stdlib-Function0: {uri-stdlib-baseModule}/Function0
:uri-stdlib-Function1: {uri-stdlib-baseModule}/Function1
:uri-stdlib-Function1-apply: {uri-stdlib-baseModule}/Function1#apply()
:uri-stdlib-Function2: {uri-stdlib-baseModule}/Function2
:uri-stdlib-Function3: {uri-stdlib-baseModule}/Function3
:uri-stdlib-Function4: {uri-stdlib-baseModule}/Function4
:uri-stdlib-Function5: {uri-stdlib-baseModule}/Function5
:uri-stdlib-Resource: {uri-stdlib-baseModule}/Resource
:uri-stdlib-outputFiles: {uri-stdlib-baseModule}/ModuleOutput#files

:uri-messagepack: https://msgpack.org/index.html
:uri-messagepack-spec: https://github.com/msgpack/msgpack/blob/master/spec.md

:uri-pkl-roadmap: https://github.com/orgs/apple/projects/12/views/1
