Skip to content

Commit 991de6b

Browse files
committed
Build fixes and instructions.
1 parent 92ac045 commit 991de6b

File tree

2 files changed

+61
-16
lines changed

2 files changed

+61
-16
lines changed

Diff for: RELEASING.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Preparing Release
2+
3+
Bump the version number in these places:
4+
1. Cargo.toml
5+
2. powersync-sqlite-core.podspec.
6+
3. android/build.gradle.kts
7+
8+
Create a tag:
9+
10+
```sh
11+
git tag -am v1.2.3 v1.2.3
12+
git push --tags
13+
```
14+
15+
# Perform Release
16+
17+
```
18+
gh workflow run release --ref v1.2.3
19+
```
20+
21+
Once that is done, go to the Maven staging repository, and promote the build:
22+
23+
https://s01.oss.sonatype.org/#stagingRepositories

Diff for: android/build.gradle.kts

+38-16
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@ repositories {
1717

1818
val buildRust = tasks.register("buildRust", Exec::class.java) {
1919
workingDir("..")
20-
commandLine("cargo", "ndk", "-t", "armeabi-v7a", "-t", "arm64-v8a", "-t", "x86", "-t", "x86_64", "-o", "./android/build/intermediates/jniLibs", "build", "--release", "-Zbuild-std", "-p", "powersync_loadable")
20+
commandLine(
21+
"cargo",
22+
"ndk",
23+
"-t",
24+
"armeabi-v7a",
25+
"-t",
26+
"arm64-v8a",
27+
"-t",
28+
"x86",
29+
"-t",
30+
"x86_64",
31+
"-o",
32+
"./android/build/intermediates/jniLibs",
33+
"build",
34+
"--release",
35+
"-Zbuild-std",
36+
"-p",
37+
"powersync_loadable"
38+
)
2139
}
2240

2341
android {
@@ -93,21 +111,25 @@ publishing {
93111
}
94112

95113
repositories {
96-
maven {
97-
name = "sonatype"
98-
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
99-
credentials {
100-
username = System.getenv("OSSRH_USERNAME")
101-
password = System.getenv("OSSRH_PASSWORD")
102-
}
103-
}
104-
105-
maven {
106-
name = "GitHubPackages"
107-
url = uri("https://maven.pkg.github.com/journeyapps/powersync-sqlite-core")
108-
credentials {
109-
username = System.getenv("GITHUB_ACTOR")
110-
password = System.getenv("GITHUB_TOKEN")
114+
if (System.getenv("OSSRH_USERNAME") != null) {
115+
maven {
116+
name = "sonatype"
117+
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
118+
credentials {
119+
username = System.getenv("OSSRH_USERNAME")
120+
password = System.getenv("OSSRH_PASSWORD")
121+
}
122+
}
123+
}
124+
125+
if (System.getenv("GITHUB_ACTOR") != null) {
126+
maven {
127+
name = "GitHubPackages"
128+
url = uri("https://maven.pkg.github.com/journeyapps/powersync-sqlite-core")
129+
credentials {
130+
username = System.getenv("GITHUB_ACTOR")
131+
password = System.getenv("GITHUB_TOKEN")
132+
}
111133
}
112134
}
113135
}

0 commit comments

Comments
 (0)