Skip to content

Commit

Permalink
Merge pull request #371 from NordicSemiconductor/migration/kts
Browse files Browse the repository at this point in the history
Migration to Kotlin Script
  • Loading branch information
philips77 authored Dec 16, 2022
2 parents b12e2e8 + af5c872 commit 3108256
Show file tree
Hide file tree
Showing 37 changed files with 318 additions and 756 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/deploy-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
generateReadme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0
Expand All @@ -28,20 +28,19 @@ jobs:
needs: generateReadme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0
- shell: bash
env:
# The following env variables are used by gradle/publish-module.gradle
# The following env variables are used by Nexus plugin
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
# The following env variables are used by gradle/publish-root.gradle
OSSR_USERNAME: ${{ secrets.OSSR_USERNAME }}
OSSR_PASSWORD: ${{ secrets.OSSR_PASSWORD }}
SONATYPE_STATING_PROFILE_ID: ${{ secrets.SONATYPE_STATING_PROFILE_ID }}
# The script generates sec.gpg file that is required by gradle/publish-module.gradle
# The script generates sec.gpg file that is required by Nexus plugin
# and starts :deployNexus lane using fastlane.
run: |
echo "${{ secrets.GPG_FILE }}" > sec.gpg.asc
Expand All @@ -50,7 +49,7 @@ jobs:
deployInternal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- shell: bash
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy-to-nexus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ jobs:
deployAarsToNexus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- shell: bash
env:
# The following env variables are used by gradle/publish-module.gradle
# The following env variables are used by Nexus plugin
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
# The following env variables are used by gradle/publish-root.gradle
OSSR_USERNAME: ${{ secrets.OSSR_USERNAME }}
OSSR_PASSWORD: ${{ secrets.OSSR_PASSWORD }}
SONATYPE_STATING_PROFILE_ID: ${{ secrets.SONATYPE_STATING_PROFILE_ID }}
# The script generates sec.gpg file that is required by gradle/publish-module.gradle
# The script generates sec.gpg file that is required by Nexus plugin
# and starts :deployNexus lane using fastlane.
run: |
echo "${{ secrets.GPG_FILE }}" > sec.gpg.asc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-play-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
deployInternal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
generateReadme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- shell: bash
Expand Down
74 changes: 0 additions & 74 deletions app/build.gradle

This file was deleted.

30 changes: 30 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
plugins {
// https://github.com/NordicSemiconductor/Android-Gradle-Plugins/blob/main/plugins/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt
alias(libs.plugins.nordic.application.compose)
// https://github.com/NordicSemiconductor/Android-Gradle-Plugins/blob/main/plugins/src/main/kotlin/AndroidHiltConventionPlugin.kt
alias(libs.plugins.nordic.hilt)
}

if (gradle.startParameter.taskRequests.toString().contains("Release")) {
apply(plugin = "com.google.gms.google-services")
apply(plugin = "com.google.firebase.crashlytics")
}

android {
namespace = "no.nordicsemi.android.dfu.app"
defaultConfig {
applicationId = "no.nordicsemi.android.dfu"
resourceConfigurations.add("en")
}
}

dependencies {
implementation(project(":lib:analytics"))
implementation(project(":lib:storage")) // Deep link support
implementation(project(":profile:navigation"))

implementation(libs.nordic.theme)
implementation(libs.nordic.navigation)

implementation(libs.androidx.activity.compose)
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# By default, the flags in this file are appended to flags specified
# in C:/Users/alno/AppData/Local/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# directive in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
48 changes: 0 additions & 48 deletions build.gradle

This file was deleted.

18 changes: 18 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.hilt) apply false

// Nordic plugins are defined in https://github.com/NordicSemiconductor/Android-Gradle-Plugins
alias(libs.plugins.nordic.application) apply false
alias(libs.plugins.nordic.application.compose) apply false
alias(libs.plugins.nordic.library) apply false
alias(libs.plugins.nordic.library.compose) apply false
alias(libs.plugins.nordic.feature) apply false
alias(libs.plugins.nordic.kotlin) apply false
alias(libs.plugins.nordic.hilt) apply false
alias(libs.plugins.nordic.nexus) apply false

id("com.google.gms.google-services") version "4.3.14" apply false
id("com.google.firebase.crashlytics") version "2.9.2" apply false
}
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ platform :android do

desc "Deploy libraries to Nexus."
lane :deployNexus do
gradle(task: "publishToSonatype closeAndReleaseSonatypeStagingRepository")
gradle(task: "publish")
end

desc "Deploy a new version to the Google Play"
Expand Down
16 changes: 1 addition & 15 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,4 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

GROUP=no.nordicsemi.android

POM_DESCRIPTION=Device Firmware Update library for Android
POM_URL=https://github.com/NordicSemiconductor/Android-DFU-Library
POM_SCM_URL=https://github.com/NordicSemiconductor/Android-DFU-Library
POM_SCM_CONNECTION=scm:[email protected]:NordicSemiconductor/Android-DFU-Library.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:NordicSemiconductor/Android-DFU-Library.git
POM_LICENCE=BSD 3-Clause
POM_LICENCE_NAME=The BSD 3-Clause License
POM_LICENCE_URL=http://opensource.org/licenses/BSD-3-Clause
POM_DEVELOPER_ID=philips77
POM_DEVELOPER_NAME=Aleksander Nowakowski
POM_DEVELOPER_EMAIL=[email protected]
kotlin.code.style=official
27 changes: 0 additions & 27 deletions gradle/git-tag-version.gradle

This file was deleted.

68 changes: 0 additions & 68 deletions gradle/publish-module.gradle

This file was deleted.

Loading

0 comments on commit 3108256

Please sign in to comment.