Skip to content

Commit

Permalink
Update gradle, sdk version and dependencies (#556)
Browse files Browse the repository at this point in the history
* update gradle, sdk version and dependencies

* update java in workflows

* assign more memory to gradle

* revert updating dependencies in autobahn
  • Loading branch information
muzzammilshahid committed Feb 9, 2024
1 parent f890391 commit 461cce4
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 11
java-version: 17

- name: Setup Android SDK
uses: android-actions/setup-android@v2
Expand Down
12 changes: 6 additions & 6 deletions autobahn/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def pomConfig = {

if (IS_ANDROID) {
android {
compileSdkVersion 30
buildToolsVersion '30.0.3'
namespace "io.crossbar.autobahn"
defaultConfig {
compileSdk 34
minSdkVersion 26
targetSdkVersion 30
targetSdkVersion 34
}
buildTypes {
release {
Expand Down Expand Up @@ -111,7 +111,7 @@ if (IS_ANDROID) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
classpath += configurations.implementation
}

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

afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompile.classpath.files
variant.javaCompileProvider.get().classpath.files
})
}

Expand Down Expand Up @@ -186,7 +186,7 @@ afterEvaluate {
publications {
release(MavenPublication) {
if (IS_ANDROID) {
from components.release
from components.findByName('release')
artifactId ARTIFACT_ANDROID
} else {
from components.java
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ buildscript {
// Android specific dependencies.
if (project.properties.get('buildPlatform', 'android') == 'android') {
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}
}
Expand Down
13 changes: 7 additions & 6 deletions demo-gallery/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: project.IS_ANDROID ? project.PLUGIN_ANDROID_APP: project.PLUGIN_JA

if (plugins.hasPlugin(project.PLUGIN_ANDROID_APP)) {
android {
compileSdkVersion 30
buildToolsVersion '30.0.3'

defaultConfig {
namespace "io.crossbar.autobahn.demogallery"
compileSdk 34
minSdkVersion 26
targetSdkVersion 30
targetSdkVersion 34
multiDexEnabled true
}
buildTypes {
Expand Down Expand Up @@ -41,13 +41,14 @@ if (plugins.hasPlugin(project.PLUGIN_ANDROID_APP)) {

dependencies {
implementation project(path: ':autobahn')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.android.support:multidex:1.0.3'
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation "com.google.android.material:material:1.3.0"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "com.google.android.material:material:1.11.0"

implementation 'com.basgeekball:awesome-validation:4.2'
implementation 'org.web3j:crypto:4.6.0-android'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
}
} else if (project.IS_NEXT) {
// Nothing useful is produced here, however this avoids
Expand Down
4 changes: 3 additions & 1 deletion demo-gallery/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".android.MainActivity">
<activity
android:name=".android.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,15 @@ protected void onCreate(Bundle savedInstanceState) {

@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.button_test_suite_client:
startActivity(new Intent(getApplicationContext(), TestSuiteClientActivity.class));
break;
case R.id.button_websocket_echo_client:
startActivity(new Intent(getApplicationContext(), EchoClientActivity.class));
break;
case R.id.buttonXBRSeller:
startActivity(new Intent(getApplicationContext(), XbrSellerActivity.class));
break;
case R.id.buttonXBRBuyer:
startActivity(new Intent(getApplicationContext(), XbrBuyerActivity.class));
break;
int id = v.getId();
if (id == R.id.button_test_suite_client) {
startActivity(new Intent(getApplicationContext(), TestSuiteClientActivity.class));
} else if (id == R.id.button_websocket_echo_client) {
startActivity(new Intent(getApplicationContext(), EchoClientActivity.class));
} else if (id == R.id.buttonXBRSeller) {
startActivity(new Intent(getApplicationContext(), XbrSellerActivity.class));
} else if (id == R.id.buttonXBRBuyer) {
startActivity(new Intent(getApplicationContext(), XbrBuyerActivity.class));
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ org.gradle.caching = true
org.gradle.parallel = true
org.gradle.configureondemand = true
org.gradle.vfs.watch = true
org.gradle.jvmargs=-Xmx1024m

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Mar 28 15:31:06 PKT 2018
#Wed Feb 07 15:50:44 PKT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip

0 comments on commit 461cce4

Please sign in to comment.