Skip to content

Commit 4f6ca3d

Browse files
committed
Upgraded to java 17
1 parent ef2d95f commit 4f6ca3d

File tree

15 files changed

+110
-86
lines changed

15 files changed

+110
-86
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v3
11-
- uses: actions/setup-java@v3
12-
with:
13-
java-version: '11'
14-
distribution: 'temurin'
1511
- uses: actions/setup-node@v3
1612
with:
1713
node-version: '18'
1814
- uses: android-actions/setup-android@v3
15+
- run: sdkmanager "ndk;27.1.12297006"
1916
- run: npm i -g electrode-native
2017
- uses: actions/checkout@v3
2118
with:
22-
repository: electrode-io/electrode-native
19+
repository: r0h0gg6/electrode-native
20+
ref: upgrade-rn-0.77
2321
path: electrode-native
22+
- name: Verify electrode-native branch
23+
working-directory: electrode-native/
24+
run: |
25+
echo "Current branch/ref:"
26+
git branch -a
27+
git log --oneline -n 5
28+
echo "Remote URL:"
29+
git remote -v
2430
- working-directory: electrode-native/
2531
run: node setup-dev.js
2632
- run: ern platform use 1000.0.0
@@ -40,8 +46,24 @@ jobs:
4046
with:
4147
xcode-version: '12.4.0'
4248
- run: npm i -g electrode-native
49+
- uses: actions/checkout@v3
50+
with:
51+
repository: r0h0gg6/electrode-native
52+
ref: upgrade-rn-0.77
53+
path: electrode-native
54+
- name: Verify electrode-native branch (iOS)
55+
working-directory: electrode-native/
56+
run: |
57+
echo "Current branch/ref:"
58+
git branch -a
59+
git log --oneline -n 5
60+
echo "Remote URL:"
61+
git remote -v
62+
- working-directory: electrode-native/
63+
run: node setup-dev.js
64+
- run: ern platform use 1000.0.0
4365
- run: yarn --frozen-lockfile
4466
- working-directory: ios/
45-
run: ern create-container -p ios --out ${PWD}/container -m https://github.com/electrode-io/movies-reloaded-miniapp
67+
run: ern create-container -p ios --out ${PWD}/container -m https://github.com/electrode-io/movies-reloaded-miniapp#java-17-upgrade
4668
- working-directory: ios/container/
4769
run: xcodebuild -workspace "ElectrodeContainer.xcworkspace" -scheme "ElectrodeContainer" -destination "platform=iOS Simulator,name=iPhone 11"

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v3
1111
- uses: actions/setup-node@v3
1212
with:
13-
node-version: '16'
13+
node-version: '18'
1414
registry-url: 'https://registry.npmjs.org'
1515
- run: yarn --frozen-lockfile
1616
- run: npm publish --access public

android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
4+
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:3.5.3'
7+
classpath 'com.android.tools.build:gradle:8.7.2'
88
}
99
}
1010

1111
allprojects {
1212
repositories {
1313
google()
14-
jcenter()
14+
mavenCentral()
1515
mavenLocal()
1616
}
1717
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 30
5-
buildToolsVersion "30.0.3"
4+
namespace 'com.walmartlabs.ern.navigation.support.lib'
5+
compileSdkVersion 35
6+
buildToolsVersion "35.0.0"
67

78
defaultConfig {
8-
minSdkVersion 19
9-
targetSdkVersion 30
9+
minSdkVersion 24
10+
targetSdkVersion 35
1011
versionCode 1
1112
versionName "1.0"
1213

@@ -21,15 +22,15 @@ android {
2122
}
2223
}
2324
compileOptions {
24-
sourceCompatibility JavaVersion.VERSION_1_8
25-
targetCompatibility JavaVersion.VERSION_1_8
25+
sourceCompatibility JavaVersion.VERSION_17
26+
targetCompatibility JavaVersion.VERSION_17
2627
}
2728
}
2829

2930
dependencies {
30-
implementation 'androidx.appcompat:appcompat:1.2.0'
31+
implementation 'androidx.appcompat:appcompat:1.7.0'
3132
testImplementation 'junit:junit:4.13.2'
32-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
33-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
33+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
34+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
3435
}
3536
apply from: 'maven-publish.gradle'

android/ern-navigation-support-lib/maven-publish.gradle

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
apply plugin: 'maven'
17+
apply plugin: 'maven-publish'
1818
apply plugin: 'signing'
1919

2020
def isReleaseBuild() {
@@ -39,66 +39,68 @@ def getRepositoryPassword() {
3939
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
4040
}
4141

42-
afterEvaluate { project ->
43-
uploadArchives {
44-
repositories {
45-
mavenDeployer {
46-
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47-
48-
pom.groupId = GROUP
49-
pom.artifactId = POM_ARTIFACT_ID
50-
pom.version = VERSION_NAME
51-
52-
repository(url: getReleaseRepositoryUrl()) {
53-
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54-
}
55-
snapshotRepository(url: getSnapshotRepositoryUrl()) {
56-
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57-
}
42+
task androidSourcesJar(type: Jar) {
43+
archiveClassifier = 'sources'
44+
from android.sourceSets.main.java.srcDirs
45+
}
5846

59-
pom.project {
60-
name POM_NAME
61-
packaging POM_PACKAGING
62-
description POM_DESCRIPTION
63-
url POM_URL
47+
afterEvaluate {
48+
publishing {
49+
publications {
50+
release(MavenPublication) {
51+
// For AGP 8.x, we directly specify the artifacts
52+
artifact bundleReleaseAar
53+
artifact androidSourcesJar
54+
55+
groupId = GROUP
56+
artifactId = POM_ARTIFACT_ID
57+
version = VERSION_NAME
58+
59+
pom {
60+
name = POM_NAME
61+
packaging = POM_PACKAGING
62+
description = POM_DESCRIPTION
63+
url = POM_URL
6464

6565
scm {
66-
url POM_SCM_URL
67-
connection POM_SCM_CONNECTION
68-
developerConnection POM_SCM_DEV_CONNECTION
66+
url = POM_SCM_URL
67+
connection = POM_SCM_CONNECTION
68+
developerConnection = POM_SCM_DEV_CONNECTION
6969
}
7070

7171
licenses {
7272
license {
73-
name POM_LICENCE_NAME
74-
url POM_LICENCE_URL
75-
distribution POM_LICENCE_DIST
73+
name = POM_LICENCE_NAME
74+
url = POM_LICENCE_URL
75+
distribution = POM_LICENCE_DIST
7676
}
7777
}
7878

7979
developers {
8080
developer {
81-
id POM_DEVELOPER_ID
82-
name POM_DEVELOPER_NAME
81+
id = POM_DEVELOPER_ID
82+
name = POM_DEVELOPER_NAME
8383
}
8484
}
8585
}
8686
}
8787
}
88+
89+
repositories {
90+
maven {
91+
def releasesRepoUrl = getReleaseRepositoryUrl()
92+
def snapshotsRepoUrl = getSnapshotRepositoryUrl()
93+
url = isReleaseBuild() ? releasesRepoUrl : snapshotsRepoUrl
94+
credentials {
95+
username = getRepositoryUsername()
96+
password = getRepositoryPassword()
97+
}
98+
}
99+
}
88100
}
89-
101+
90102
signing {
91-
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92-
sign configurations.archives
93-
}
94-
95-
96-
task androidSourcesJar(type: Jar) {
97-
archiveClassifier.set("sources")
98-
from android.sourceSets.main.java.sourceFiles
99-
}
100-
101-
artifacts {
102-
archives androidSourcesJar
103+
required { isReleaseBuild() && gradle.taskGraph.hasTask("publish") }
104+
sign publishing.publications.release
103105
}
104106
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.walmartlabs.ern.navigation.res.lib">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
</manifest>

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12-
org.gradle.jvmargs=-Xmx1536m
12+
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1313

1414
# When configured, Gradle will run in incubating parallel mode.
1515
# This option should only be used with decoupled projects. More details, visit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

android/lib/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 28
5-
buildToolsVersion "28.0.3"
4+
namespace 'com.walmartlabs.ern.navigation.api.impl'
5+
compileSdkVersion 35
6+
buildToolsVersion "35.0.0"
67
defaultConfig {
7-
minSdkVersion 19
8-
targetSdkVersion 28
8+
minSdkVersion 24
9+
targetSdkVersion 35
910
versionCode 1
1011
versionName "1.0"
1112
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -28,8 +29,8 @@ android {
2829
unitTests.returnDefaultValues = true
2930
}
3031
compileOptions {
31-
sourceCompatibility = '1.8'
32-
targetCompatibility = '1.8'
32+
sourceCompatibility JavaVersion.VERSION_17
33+
targetCompatibility JavaVersion.VERSION_17
3334
}
3435
}
3536

android/lib/src/androidTest/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.walmartlabs.ern.navigation.sample">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<application>
54
<activity

0 commit comments

Comments
 (0)