Skip to content

Commit cd83d11

Browse files
committed
Upgraded to java 17
1 parent ef2d95f commit cd83d11

File tree

11 files changed

+103
-78
lines changed

11 files changed

+103
-78
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
}

android/ern-navigation-support-lib/build.gradle

Lines changed: 13 additions & 6 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,8 +22,14 @@ 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
27+
}
28+
29+
publishing {
30+
singleVariant('release') {
31+
withSourcesJar()
32+
}
2633
}
2734
}
2835

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

Lines changed: 39 additions & 45 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,60 @@ 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-
}
58-
59-
pom.project {
60-
name POM_NAME
61-
packaging POM_PACKAGING
62-
description POM_DESCRIPTION
63-
url POM_URL
42+
afterEvaluate {
43+
publishing {
44+
publications {
45+
release(MavenPublication) {
46+
from components.release
47+
groupId = GROUP
48+
artifactId = POM_ARTIFACT_ID
49+
version = VERSION_NAME
50+
51+
pom {
52+
name = POM_NAME
53+
packaging = POM_PACKAGING
54+
description = POM_DESCRIPTION
55+
url = POM_URL
6456

6557
scm {
66-
url POM_SCM_URL
67-
connection POM_SCM_CONNECTION
68-
developerConnection POM_SCM_DEV_CONNECTION
58+
url = POM_SCM_URL
59+
connection = POM_SCM_CONNECTION
60+
developerConnection = POM_SCM_DEV_CONNECTION
6961
}
7062

7163
licenses {
7264
license {
73-
name POM_LICENCE_NAME
74-
url POM_LICENCE_URL
75-
distribution POM_LICENCE_DIST
65+
name = POM_LICENCE_NAME
66+
url = POM_LICENCE_URL
67+
distribution = POM_LICENCE_DIST
7668
}
7769
}
7870

7971
developers {
8072
developer {
81-
id POM_DEVELOPER_ID
82-
name POM_DEVELOPER_NAME
73+
id = POM_DEVELOPER_ID
74+
name = POM_DEVELOPER_NAME
8375
}
8476
}
8577
}
8678
}
8779
}
80+
81+
repositories {
82+
maven {
83+
def releasesRepoUrl = getReleaseRepositoryUrl()
84+
def snapshotsRepoUrl = getSnapshotRepositoryUrl()
85+
url = isReleaseBuild() ? releasesRepoUrl : snapshotsRepoUrl
86+
credentials {
87+
username = getRepositoryUsername()
88+
password = getRepositoryPassword()
89+
}
90+
}
91+
}
8892
}
93+
}
8994

90-
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-
}
95+
signing {
96+
required { isReleaseBuild() && gradle.taskGraph.hasTask("publish") }
97+
sign publishing.publications.release
10498
}

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/moviesreloaded/build.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ apply plugin: 'com.android.application'
22
apply from: 'ern.gradle'
33

44
android {
5-
compileSdkVersion 28
5+
namespace 'com.walmartlabs.moviesreloaded'
6+
compileSdkVersion 35
67

78
defaultConfig {
89
applicationId "com.walmartlabs.moviesreloaded"
9-
minSdkVersion 23
10-
targetSdkVersion 28
10+
minSdkVersion 24
11+
targetSdkVersion 35
1112
versionCode 1
1213
versionName "1.0"
1314

@@ -22,11 +23,11 @@ android {
2223
}
2324
}
2425
compileOptions {
25-
sourceCompatibility = '1.8'
26-
targetCompatibility = '1.8'
26+
sourceCompatibility JavaVersion.VERSION_17
27+
targetCompatibility JavaVersion.VERSION_17
2728
}
28-
buildToolsVersion = '28.0.3'
29-
ndkVersion "21.0.6113669"
29+
buildToolsVersion = '35.0.0'
30+
ndkVersion "27.1.12297006"
3031
}
3132

3233
dependencies {

android/moviesreloaded/ern.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ final String HOMEDIR = System.getenv('WORKSPACE') ?: System.getProperty('user.ho
44
final String CONTAINER_PATH = "$HOMEDIR/.ern/containergen/out/android"
55

66
task createErnDevContainer(type: Exec) {
7-
commandLine "ern", "create-container", "-m", "https://github.com/electrode-io/movies-reloaded-miniapp.git", "--platform", "android"
7+
commandLine "ern", "create-container", "-m", "https://github.com/electrode-io/movies-reloaded-miniapp.git#java-17-upgrade", "--platform", "android"
88
}
99

1010
task deleteApiImplSrc(type: Delete) {

0 commit comments

Comments
 (0)