Skip to content

Commit 70edd92

Browse files
committed
Another approach
1 parent 9f0e5b1 commit 70edd92

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/source/conf.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@
142142

143143
autodoc_typehints = "none"
144144

145-
html_context = {
146-
"version": version,
147-
"aar_version": "0.7.0",
148-
}
149-
150-
151145
# Add any paths that contain templates here, relative to this directory.
152146
# templates_path = ["../_templates"]
153147

docs/source/executorch_custom_versions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
.ci/docker/ci_commit_pins directory, and uses them to expand specific strings in
1212
markdown files.
1313
14+
Users can also specify their custom version strings in the global variable `variables`
15+
1416
For example, `${executorch_version:pytorch}` will be replaced with the
1517
appropriate pytorch version string used by CI.
1618
"""
@@ -24,7 +26,10 @@
2426
"pytorch.txt",
2527
]
2628

27-
variables: dict[str, str] = {}
29+
30+
variables: dict[str, str] = {
31+
"aar_version": "0.7.0",
32+
}
2833

2934

3035
def read_version_files():

docs/source/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ To add the library to your app, add the following dependency to gradle build rul
124124
```
125125
# app/build.gradle.kts
126126
dependencies {
127-
implementation("org.pytorch:executorch-android:{{ aar_version }}")
127+
implementation("org.pytorch:executorch-android:{{ executorch_version:aar_version }}")
128128
}
129129
130130
# See latest available versions in https://mvnrepository.com/artifact/org.pytorch/executorch-android

docs/source/using-executorch-android.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ The AAR library can be used for generic Android device with arm64-v8a or x86_64
2828

2929
ExecuTorch is available on [Maven Central](https://mvnrepository.com/artifact/org.pytorch/executorch-android).
3030

31-
Simply add the target [`org.pytorch:executorch-android:{{ aar_version }}`](https://repo.maven.apache.org/maven2/org/pytorch/executorch-android/{{ aar_version }}/) to your Android app dependency (build.gradle), and build your app.
31+
Simply add the target [`org.pytorch:executorch-android:{{ executorch_version:aar_version }}`](https://repo.maven.apache.org/maven2/org/pytorch/executorch-android/{{ executorch_version:aar_version }}/) to your Android app dependency (build.gradle), and build your app.
3232

3333
For example:
3434
```
3535
# app/build.gradle.kts
3636
dependencies {
37-
implementation("org.pytorch:executorch-android:{{ aar_version }}")
37+
implementation("org.pytorch:executorch-android:{{ executorch_version:aar_version }}")
3838
}
3939
```
4040

@@ -53,7 +53,8 @@ You can also directly specify an AAR file in the app. We upload pre-built AAR to
5353

5454
| Version | AAR | SHASUMS |
5555
| ------- | --- | ------- |
56-
| [{{ aar_version }}](https://github.com/pytorch/executorch/releases/tag/{{ aar_version }}) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/{{ aar_version }}/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/{{ aar_version }}/executorch.aar.sha256sums) |
56+
| [{{ executorch_version:aar_version }}](https://github.com/pytorch/executorch/releases/tag/{{ executorch_version:aar_version }}) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/{{ executorch_version:aar_version }}/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/{{ executorch_version:aar_version }}/executorch.aar.sha256sums) |
57+
| [v0.6.0](https://github.com/pytorch/executorch/releases/tag/v0.6.0) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0/executorch.aar.sha256sums) |
5758
| [v0.5.0](https://github.com/pytorch/executorch/releases/tag/v0.5.0) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/v0.5.0-rc3/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/v0.5.0-rc3/executorch.aar.sha256sums) |
5859

5960
### Snapshots from main branch
@@ -90,7 +91,7 @@ implementation("com.facebook.fbjni:fbjni:0.5.1")
9091
In your app working directory, such as executorch/examples/demo-apps/android/LlamaDemo,
9192
```
9293
mkdir -p app/libs
93-
curl https://ossci-android.s3.amazonaws.com/executorch/release/{{ aar_version }}/executorch.aar -o app/libs/executorch.aar
94+
curl https://ossci-android.s3.amazonaws.com/executorch/release/{{ executorch_version:aar_version }}/executorch.aar -o app/libs/executorch.aar
9495
```
9596

9697
And include it in gradle:

0 commit comments

Comments
 (0)