Skip to content

Commit 0ff14e9

Browse files
authored
Merge pull request #27 from skydoves/migrate/deps
Update versions and migrate to kotlin 2.0
2 parents 3c5f87b + cffabe0 commit 0ff14e9

44 files changed

Lines changed: 670 additions & 564 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/android.yml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,55 @@ on:
99
jobs:
1010
lint:
1111
name: Spotless check
12-
runs-on: ubuntu-18.04
12+
runs-on: macos-latest
1313
steps:
1414
- name: Check out code
1515
uses: actions/checkout@v2
1616
- name: Set up JDK
1717
uses: actions/setup-java@v1
1818
with:
19-
java-version: 11
19+
distribution: 'zulu'
20+
java-version: 17
2021
- name: spotless
2122
run: ./gradlew spotlessCheck
2223

2324
api_check:
2425
name: API check
25-
runs-on: ubuntu-18.04
26+
runs-on: macos-latest
2627
steps:
2728
- name: Check out code
2829
uses: actions/checkout@v2
2930
- name: Set up JDK
3031
uses: actions/setup-java@v1
3132
with:
32-
java-version: 11
33+
distribution: 'zulu'
34+
java-version: 17
3335
- name: API check
3436
run: ./gradlew apiCheck
3537

3638
build:
37-
runs-on: ubuntu-latest
39+
runs-on: macos-latest
3840
steps:
39-
- uses: actions/checkout@v2
40-
41-
- name: set up JDK
42-
uses: actions/setup-java@v1
43-
with:
44-
java-version: 11
45-
46-
- name: Cache Gradle and wrapper
47-
uses: actions/cache@v2
48-
with:
49-
path: |
50-
~/.gradle/caches
51-
~/.gradle/wrapper
52-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
53-
restore-keys: |
54-
${{ runner.os }}-gradle-
55-
56-
- name: Make Gradle executable
57-
run: chmod +x ./gradlew
58-
59-
- name: Build with Gradle
60-
run: ./gradlew build
41+
- uses: actions/checkout@v2
42+
43+
- name: set up JDK
44+
uses: actions/setup-java@v1
45+
with:
46+
distribution: 'zulu'
47+
java-version: 17
48+
49+
- name: Cache Gradle and wrapper
50+
uses: actions/cache@v2
51+
with:
52+
path: |
53+
~/.gradle/caches
54+
~/.gradle/wrapper
55+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
56+
restore-keys: |
57+
${{ runner.os }}-gradle-
58+
59+
- name: Make Gradle executable
60+
run: chmod +x ./gradlew
61+
62+
- name: Build with Gradle
63+
run: ./gradlew build

.github/workflows/publish-snapshot.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,35 @@ name: Publish
22

33
on:
44
release:
5-
types: [released]
5+
types: [ released ]
6+
workflow_dispatch:
67

78
jobs:
89
publish:
9-
name: Release build and publish
10-
runs-on: ubuntu-latest
10+
name: Snapshot build and publish
11+
runs-on: macos-latest
1112
steps:
1213
- name: Check out code
13-
uses: actions/checkout@v2
14-
- name: Set up JDK 11
15-
uses: actions/setup-java@v2
14+
uses: actions/checkout@v3.1.0
15+
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v3.5.1
1618
with:
17-
distribution: adopt
18-
java-version: 11
19+
distribution: 'zulu'
20+
java-version: 17
21+
22+
- name: Grant Permission to Execute Gradle
23+
run: chmod +x gradlew
24+
1925
- name: Release build
2026
run: ./gradlew assemble --scan
21-
- name: Source jar and dokka
22-
run: ./gradlew androidSourcesJar javadocJar --scan
27+
2328
- name: Publish to MavenCentral
24-
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository --scan
29+
run: |
30+
./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
2531
env:
26-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
27-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
28-
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
29-
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
30-
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
31-
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
32+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
33+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
34+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
35+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
36+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}

app/build.gradle

Lines changed: 0 additions & 63 deletions
This file was deleted.

app/build.gradle.kts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
///*
2+
// * Designed and developed by 2021 skydoves (Jaewoong Eum)
3+
// *
4+
// * Licensed under the Apache License, Version 2.0 (the "License");
5+
// * you may not use this file except in compliance with the License.
6+
// * You may obtain a copy of the License at
7+
// *
8+
// * http://www.apache.org/licenses/LICENSE-2.0
9+
// *
10+
// * Unless required by applicable law or agreed to in writing, software
11+
// * distributed under the License is distributed on an "AS IS" BASIS,
12+
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// * See the License for the specific language governing permissions and
14+
// * limitations under the License.
15+
// */
16+
17+
import com.skydoves.bindables.Configuration
18+
19+
plugins {
20+
id(libs.plugins.android.application.get().pluginId)
21+
id(libs.plugins.kotlin.android.get().pluginId)
22+
id(libs.plugins.kotlin.parcelize.get().pluginId)
23+
id(libs.plugins.kotlin.kapt.get().pluginId)
24+
id(libs.plugins.ksp.get().pluginId)
25+
id(libs.plugins.hilt.plugin.get().pluginId)
26+
}
27+
28+
android {
29+
namespace = "com.skydoves.bindablesdemo"
30+
compileSdk = Configuration.compileSdk
31+
defaultConfig {
32+
applicationId = "com.skydoves.bindablesdemo"
33+
minSdk = Configuration.minSdk
34+
targetSdk = Configuration.targetSdk
35+
versionCode = Configuration.versionCode
36+
versionName = Configuration.versionName
37+
}
38+
39+
compileOptions {
40+
sourceCompatibility = JavaVersion.VERSION_11
41+
targetCompatibility = JavaVersion.VERSION_11
42+
}
43+
44+
kotlinOptions {
45+
jvmTarget = "11"
46+
}
47+
48+
buildFeatures {
49+
dataBinding = true
50+
}
51+
}
52+
53+
dependencies {
54+
implementation(project(":bindables"))
55+
56+
implementation(libs.hilt.android)
57+
implementation(libs.androidx.appcompat)
58+
implementation(libs.androidx.activity)
59+
implementation(libs.androidx.constraintlayout)
60+
ksp(libs.hilt.compiler)
61+
62+
implementation(libs.androidx.material)
63+
implementation(libs.androidx.fragment)
64+
implementation(libs.glide)
65+
implementation(libs.whatif)
66+
}

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.skydoves.bindablesdemo">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<uses-permission android:name="android.permission.INTERNET" />
65

76
<application
87
android:name=".BindableApp"
9-
android:allowBackup="false"
108
android:icon="@mipmap/ic_launcher"
119
android:label="@string/app_name"
1210
android:roundIcon="@mipmap/ic_launcher_round"
1311
android:supportsRtl="true"
1412
android:theme="@style/Theme.BindablesDemo">
13+
1514
<activity
1615
android:name=".MainActivity"
17-
android:theme="@style/AppTheme"
18-
android:exported="true">
16+
android:exported="true"
17+
android:theme="@style/AppTheme">
1918
<intent-filter>
2019
<action android:name="android.intent.action.MAIN" />
2120

app/src/main/kotlin/com/skydoves/bindablesdemo/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main
4343
override fun onPageScrolled(
4444
position: Int,
4545
positionOffset: Float,
46-
positionOffsetPixels: Int
46+
positionOffsetPixels: Int,
4747
) = Unit
4848

4949
override fun onPageSelected(position: Int) {
5050
binding.mainBottomNavigation.menu.getItem(position).isChecked = true
5151
}
52-
}
52+
},
5353
)
5454
}
5555

56-
binding.mainBottomNavigation.setOnNavigationItemSelectedListener {
56+
binding.mainBottomNavigation.setOnItemSelectedListener {
5757
when (it.itemId) {
5858
R.id.action_one -> binding.mainViewpager.currentItem = 0
5959
R.id.action_two -> binding.mainViewpager.currentItem = 1

0 commit comments

Comments
 (0)