Skip to content

Commit 19f22a4

Browse files
authored
Build script fixed
1 parent 0cf081d commit 19f22a4

9 files changed

Lines changed: 36 additions & 25 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Steps to reproduce the behavior:
2020
A clear and concise description of what you expected to happen.
2121

2222
**Platform details:**
23-
- Device: [e.g. Pixel XL]
24-
- OS: [e.g. Android 8.0]
23+
- Device: [e.g. Pixel 10]
24+
- OS: [e.g. Android 16]
2525
- Library Version (or Commit)
2626

2727
**Logs / Screenshots**

.github/workflows/deploy-all.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ jobs:
88
generateReadme:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
with:
1313
ref: main
1414
fetch-depth: 0
15+
- uses: actions/setup-java@v5
16+
with:
17+
distribution: 'jetbrains'
18+
java-version: '21'
1519
- shell: bash
1620
# The script gets VERSION from the latest tag and replaces {{VERSION}} with it in
1721
# moustache/README.mo. Then, it commits the change using GitHub Action user.
@@ -28,10 +32,14 @@ jobs:
2832
needs: generateReadme
2933
runs-on: ubuntu-latest
3034
steps:
31-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v5
3236
with:
3337
ref: main
3438
fetch-depth: 0
39+
- uses: actions/setup-java@v5
40+
with:
41+
distribution: 'jetbrains'
42+
java-version: '21'
3543
- shell: bash
3644
env:
3745
# The following env variables are used by signing configuration in sample/build.gradle
@@ -50,7 +58,7 @@ jobs:
5058
needs: generateReadme
5159
runs-on: ubuntu-latest
5260
steps:
53-
- uses: actions/checkout@v4
61+
- uses: actions/checkout@v5
5462
with:
5563
ref: main
5664
fetch-depth: 0

.github/workflows/deploy-to-play-store.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ jobs:
55
deployAabToGooglePlayInternal:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v5
99
with:
1010
fetch-depth: 0
11+
- uses: actions/setup-java@v5
12+
with:
13+
distribution: 'jetbrains'
14+
java-version: '21'
1115
- shell: bash
1216
env:
1317
# The following env variables are used by signing configuration in sample/build.gradle

.github/workflows/generate-readme.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
generateReadme:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v4
8+
- uses: actions/checkout@v5
99
with:
1010
fetch-depth: 0
1111
- shell: bash

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ buildscript {
3333
dependencies {
3434
classpath 'com.android.tools.build:gradle:8.10.0'
3535
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
36-
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
36+
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
3737

3838
// NOTE: Do not place your application dependencies here; they belong
3939
// in the individual module build.gradle files

fastlane/Fastfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ platform :android do
1919

2020
desc "Deploy libraries to Nexus."
2121
lane :deployNexus do
22-
gradle(task: "publish")
23-
gradle(task: "releaseStagingRepositories")
22+
gradle(task: "publishToSonatype closeAndReleaseSonatypeStagingRepository")
2423
end
2524

2625
desc "Deploy build to Internal channel."

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ org.gradle.jvmargs=-Xmx1536m
3434
# org.gradle.parallel=trueandroid.useAndroidX=true
3535
android.useAndroidX=true
3636

37-
# VERSION_NAME=3.2.0
3837
GROUP=no.nordicsemi.android
3938

40-
POM_DESCRIPTION=BLE Mesh library for Android
39+
POM_DESCRIPTION=Bluetooth Mesh library for Android
4140
POM_URL=https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library.git
4241
POM_SCM_URL=https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library.git
4342
POM_SCM_CONNECTION=scm:git@github.com:NordicSemiconductor/Android-nRF-Mesh-Library.git

gradle/git-tag-version.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
ext.getVersionCodeFromTags = { ->
22
try {
3-
def code = new ByteArrayOutputStream()
4-
exec {
5-
commandLine 'git', 'tag', '--list'
6-
standardOutput = code
7-
}
3+
def listOfTags = providers
4+
.exec { commandLine 'git', 'tag', '--list' }
5+
.standardOutput
6+
.asText.get()
87
// There were 42 tags so far. The first version after release using this script will
98
// have build version 100.
10-
return (99 - 42) + code.toString().split("\n").size()
9+
return (99 - 42) + listOfTags.split("\n").size()
1110
}
1211
catch (ignored) {
1312
return -1
@@ -16,14 +15,15 @@ ext.getVersionCodeFromTags = { ->
1615

1716
ext.getVersionNameFromTags = { ->
1817
try {
19-
def stdout = new ByteArrayOutputStream()
20-
exec {
21-
commandLine 'git', 'describe', '--tags', '--abbrev=0'
22-
standardOutput = stdout
23-
}
24-
return stdout.toString().trim().split("%")[0]
18+
def version = providers
19+
.exec { commandLine 'git', 'describe', '--tags', '--abbrev=0' }
20+
.standardOutput
21+
.asText.get().trim()
22+
// Version may have % to add additional information
23+
return version.split("%")[0]
2524
}
2625
catch (ignored) {
26+
ignored.printStackTrace()
2727
return null
2828
}
29-
}
29+
}

gradle/publish-root.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ nexusPublishing {
1313

1414
repositories {
1515
sonatype {
16+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
1617
stagingProfileId = System.env.SONATYPE_STAGING_PROFILE_ID
1718
username = System.env.OSSR_USERNAME
1819
password = System.env.OSSR_PASSWORD

0 commit comments

Comments
 (0)