diff --git a/android/backup-restore/build.gradle.kts b/android/backup-restore/build.gradle.kts index 7efdfe7..4ac3e42 100644 --- a/android/backup-restore/build.gradle.kts +++ b/android/backup-restore/build.gradle.kts @@ -6,12 +6,12 @@ plugins { android { namespace = "com.joinself.example.backup" - compileSdk = 35 + compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { applicationId = "com.joinself.example.backup" - minSdk = 30 - targetSdk = 35 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() versionCode = 1 versionName = "1.0" diff --git a/android/chat-qrcode/build.gradle.kts b/android/chat-qrcode/build.gradle.kts index c869f0a..8b62b75 100644 --- a/android/chat-qrcode/build.gradle.kts +++ b/android/chat-qrcode/build.gradle.kts @@ -6,12 +6,12 @@ plugins { android { namespace = "com.joinself.example.chat_qrcode" - compileSdk = 35 + compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { applicationId = "com.joinself.example.chat_qrcode" - minSdk = 30 - targetSdk = 35 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() versionCode = 1 versionName = "1.0" diff --git a/android/chat/build.gradle.kts b/android/chat/build.gradle.kts index ee517d5..e74ba33 100644 --- a/android/chat/build.gradle.kts +++ b/android/chat/build.gradle.kts @@ -6,12 +6,12 @@ plugins { android { namespace = "com.joinself.example.chat" - compileSdk = 35 + compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { applicationId = "com.joinself.example.chat" - minSdk = 30 - targetSdk = 35 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() versionCode = 1 versionName = "1.0" diff --git a/android/credential/build.gradle.kts b/android/credential/build.gradle.kts index dde61d4..7a22395 100644 --- a/android/credential/build.gradle.kts +++ b/android/credential/build.gradle.kts @@ -6,12 +6,12 @@ plugins { android { namespace = "com.joinself.example.credential" - compileSdk = 35 + compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { applicationId = "com.joinself.example.credential" - minSdk = 30 - targetSdk = 35 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() versionCode = 1 versionName = "1.0" diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index 784688f..2a5365e 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -1,15 +1,18 @@ [versions] -agp = "8.12.0" -kotlin = "2.0.21" -coreKtx = "1.16.0" +agp = "8.13.0" +kotlin = "2.2.20" +coreKtx = "1.17.0" junit = "4.13.2" junitVersion = "1.3.0" espressoCore = "3.7.0" -lifecycleRuntimeKtx = "2.9.2" -activityCompose = "1.10.1" -navigationCompose = "2.9.3" -composeBom = "2025.07.00" -sdkAndroid = "1.3.0-13-SNAPSHOT" +lifecycleRuntimeKtx = "2.9.4" +activityCompose = "1.11.0" +navigationCompose = "2.9.5" +composeBom = "2025.09.01" +sdkAndroid = "1.4.0" +minSdk = "28" +compileSdk = "36" +targetSdk = "36" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..1b33c55 Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 37f853b..d4081da 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/android/gradlew b/android/gradlew index f5feea6..23d15a9 100755 --- a/android/gradlew +++ b/android/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/android/gradlew.bat b/android/gradlew.bat index 9b42019..5eed7ee 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/android/registration/build.gradle.kts b/android/registration/build.gradle.kts index 55d4ba3..6400538 100644 --- a/android/registration/build.gradle.kts +++ b/android/registration/build.gradle.kts @@ -6,12 +6,12 @@ plugins { android { namespace = "com.joinself.example.registration" - compileSdk = 35 + compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { applicationId = "com.joinself.example.registration" - minSdk = 30 - targetSdk = 35 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() versionCode = 1 versionName = "1.0" diff --git a/android/verification/build.gradle.kts b/android/verification/build.gradle.kts index c2029f2..d15e038 100644 --- a/android/verification/build.gradle.kts +++ b/android/verification/build.gradle.kts @@ -6,12 +6,12 @@ plugins { android { namespace = "com.joinself.example.verification" - compileSdk = 35 + compileSdk = libs.versions.compileSdk.get().toInt() defaultConfig { applicationId = "com.joinself.example.verification" - minSdk = 30 - targetSdk = 35 + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() versionCode = 1 versionName = "1.0" diff --git a/java/gradle/libs.versions.toml b/java/gradle/libs.versions.toml index 157472e..de91968 100644 --- a/java/gradle/libs.versions.toml +++ b/java/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -kotlin = "2.0.21" -coroutines = "1.9.0" -serialization = "1.7.3" +kotlin = "2.2.20" +coroutines = "1.10.2" +serialization = "1.9.0" selfJvm = "1.0.3" [libraries] diff --git a/java/gradle/wrapper/gradle-wrapper.jar b/java/gradle/wrapper/gradle-wrapper.jar index a4b76b9..1b33c55 100644 Binary files a/java/gradle/wrapper/gradle-wrapper.jar and b/java/gradle/wrapper/gradle-wrapper.jar differ diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties index 37f853b..d4081da 100644 --- a/java/gradle/wrapper/gradle-wrapper.properties +++ b/java/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/java/gradlew b/java/gradlew index f5feea6..23d15a9 100755 --- a/java/gradlew +++ b/java/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/java/gradlew.bat b/java/gradlew.bat index 9d21a21..5eed7ee 100644 --- a/java/gradlew.bat +++ b/java/gradlew.bat @@ -1,94 +1,94 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java/self-demo/src/main/kotlin/com/joinself/Main.kt b/java/self-demo/src/main/kotlin/com/joinself/Main.kt index 7a4ed42..5ae0efe 100644 --- a/java/self-demo/src/main/kotlin/com/joinself/Main.kt +++ b/java/self-demo/src/main/kotlin/com/joinself/Main.kt @@ -4,38 +4,14 @@ import com.joinself.selfsdk.account.Account import com.joinself.selfsdk.account.LogLevel import com.joinself.selfsdk.account.Target import com.joinself.selfsdk.asset.BinaryObject -import com.joinself.selfsdk.credential.Address +import com.joinself.selfsdk.credential.* import com.joinself.selfsdk.credential.CredentialBuilder -import com.joinself.selfsdk.credential.CredentialField -import com.joinself.selfsdk.credential.CredentialType -import com.joinself.selfsdk.credential.PresentationBuilder import com.joinself.selfsdk.credential.predicate.Predicate import com.joinself.selfsdk.credential.predicate.PredicateTree import com.joinself.selfsdk.error.SelfStatus -import com.joinself.selfsdk.event.AnonymousMessage -import com.joinself.selfsdk.event.Commit -import com.joinself.selfsdk.event.Dropped -import com.joinself.selfsdk.event.Flag -import com.joinself.selfsdk.event.FlagSet -import com.joinself.selfsdk.event.Integrity -import com.joinself.selfsdk.event.KeyPackage -import com.joinself.selfsdk.event.Message -import com.joinself.selfsdk.event.Proposal -import com.joinself.selfsdk.event.QrEncoding -import com.joinself.selfsdk.event.Reference -import com.joinself.selfsdk.event.Welcome +import com.joinself.selfsdk.event.* import com.joinself.selfsdk.keypair.signing.PublicKey -import com.joinself.selfsdk.message.Chat -import com.joinself.selfsdk.message.ChatBuilder -import com.joinself.selfsdk.message.ComparisonOperator -import com.joinself.selfsdk.message.ContentType -import com.joinself.selfsdk.message.CredentialPresentationRequestBuilder -import com.joinself.selfsdk.message.CredentialPresentationResponse -import com.joinself.selfsdk.message.CredentialVerificationRequestBuilder -import com.joinself.selfsdk.message.CredentialVerificationResponse -import com.joinself.selfsdk.message.DiscoveryRequestBuilder -import com.joinself.selfsdk.message.DiscoveryResponse -import com.joinself.selfsdk.message.Receipt +import com.joinself.selfsdk.message.* import com.joinself.selfsdk.platform.Attestation import com.joinself.selfsdk.time.Timestamp import kotlinx.coroutines.runBlocking