Skip to content

Commit 461cce4

Browse files
Update gradle, sdk version and dependencies (#556)
* update gradle, sdk version and dependencies * update java in workflows * assign more memory to gradle * revert updating dependencies in autobahn
1 parent f890391 commit 461cce4

File tree

9 files changed

+32
-31
lines changed

9 files changed

+32
-31
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616

17-
- name: Set up JDK 11
17+
- name: Set up JDK 17
1818
uses: actions/setup-java@v3
1919
with:
2020
distribution: 'corretto'
21-
java-version: 11
21+
java-version: 17
2222

2323
- name: Setup Android SDK
2424
uses: android-actions/setup-android@v2

autobahn/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def pomConfig = {
6666

6767
if (IS_ANDROID) {
6868
android {
69-
compileSdkVersion 30
70-
buildToolsVersion '30.0.3'
69+
namespace "io.crossbar.autobahn"
7170
defaultConfig {
71+
compileSdk 34
7272
minSdkVersion 26
73-
targetSdkVersion 30
73+
targetSdkVersion 34
7474
}
7575
buildTypes {
7676
release {
@@ -111,7 +111,7 @@ if (IS_ANDROID) {
111111
failOnError false
112112
source = android.sourceSets.main.java.sourceFiles
113113
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
114-
classpath += configurations.compile
114+
classpath += configurations.implementation
115115
}
116116

117117
task javadocJar(type: Jar, dependsOn: javadoc) {
@@ -125,7 +125,7 @@ if (IS_ANDROID) {
125125

126126
afterEvaluate {
127127
javadoc.classpath += files(android.libraryVariants.collect { variant ->
128-
variant.javaCompile.classpath.files
128+
variant.javaCompileProvider.get().classpath.files
129129
})
130130
}
131131

@@ -186,7 +186,7 @@ afterEvaluate {
186186
publications {
187187
release(MavenPublication) {
188188
if (IS_ANDROID) {
189-
from components.release
189+
from components.findByName('release')
190190
artifactId ARTIFACT_ANDROID
191191
} else {
192192
from components.java

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ buildscript {
2727
// Android specific dependencies.
2828
if (project.properties.get('buildPlatform', 'android') == 'android') {
2929
dependencies {
30-
classpath 'com.android.tools.build:gradle:4.1.3'
30+
classpath 'com.android.tools.build:gradle:8.2.2'
3131
}
3232
}
3333
}

demo-gallery/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ apply plugin: project.IS_ANDROID ? project.PLUGIN_ANDROID_APP: project.PLUGIN_JA
22

33
if (plugins.hasPlugin(project.PLUGIN_ANDROID_APP)) {
44
android {
5-
compileSdkVersion 30
6-
buildToolsVersion '30.0.3'
75

86
defaultConfig {
7+
namespace "io.crossbar.autobahn.demogallery"
8+
compileSdk 34
99
minSdkVersion 26
10-
targetSdkVersion 30
10+
targetSdkVersion 34
1111
multiDexEnabled true
1212
}
1313
buildTypes {
@@ -41,13 +41,14 @@ if (plugins.hasPlugin(project.PLUGIN_ANDROID_APP)) {
4141

4242
dependencies {
4343
implementation project(path: ':autobahn')
44-
implementation 'androidx.appcompat:appcompat:1.2.0'
44+
implementation 'androidx.appcompat:appcompat:1.6.1'
4545
implementation 'com.android.support:multidex:1.0.3'
46-
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
47-
implementation "com.google.android.material:material:1.3.0"
46+
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
47+
implementation "com.google.android.material:material:1.11.0"
4848

4949
implementation 'com.basgeekball:awesome-validation:4.2'
5050
implementation 'org.web3j:crypto:4.6.0-android'
51+
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
5152
}
5253
} else if (project.IS_NEXT) {
5354
// Nothing useful is produced here, however this avoids

demo-gallery/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
android:label="@string/app_name"
1212
android:supportsRtl="true"
1313
android:theme="@style/AppTheme">
14-
<activity android:name=".android.MainActivity">
14+
<activity
15+
android:name=".android.MainActivity"
16+
android:exported="true">
1517
<intent-filter>
1618
<action android:name="android.intent.action.VIEW" />
1719
<action android:name="android.intent.action.MAIN"/>

demo-gallery/src/main/java/io/crossbar/autobahn/demogallery/android/MainActivity.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,15 @@ protected void onCreate(Bundle savedInstanceState) {
3030

3131
@Override
3232
public void onClick(View v) {
33-
switch (v.getId()) {
34-
case R.id.button_test_suite_client:
35-
startActivity(new Intent(getApplicationContext(), TestSuiteClientActivity.class));
36-
break;
37-
case R.id.button_websocket_echo_client:
38-
startActivity(new Intent(getApplicationContext(), EchoClientActivity.class));
39-
break;
40-
case R.id.buttonXBRSeller:
41-
startActivity(new Intent(getApplicationContext(), XbrSellerActivity.class));
42-
break;
43-
case R.id.buttonXBRBuyer:
44-
startActivity(new Intent(getApplicationContext(), XbrBuyerActivity.class));
45-
break;
33+
int id = v.getId();
34+
if (id == R.id.button_test_suite_client) {
35+
startActivity(new Intent(getApplicationContext(), TestSuiteClientActivity.class));
36+
} else if (id == R.id.button_websocket_echo_client) {
37+
startActivity(new Intent(getApplicationContext(), EchoClientActivity.class));
38+
} else if (id == R.id.buttonXBRSeller) {
39+
startActivity(new Intent(getApplicationContext(), XbrSellerActivity.class));
40+
} else if (id == R.id.buttonXBRBuyer) {
41+
startActivity(new Intent(getApplicationContext(), XbrBuyerActivity.class));
4642
}
4743
}
4844
}

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ org.gradle.caching = true
44
org.gradle.parallel = true
55
org.gradle.configureondemand = true
66
org.gradle.vfs.watch = true
7+
org.gradle.jvmargs=-Xmx1024m
8+

gradle/wrapper/gradle-wrapper.jar

4.71 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Mar 28 15:31:06 PKT 2018
1+
#Wed Feb 07 15:50:44 PKT 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip

0 commit comments

Comments
 (0)