From f88e0f56e54145557d98d8269af12bb5c589f9ab Mon Sep 17 00:00:00 2001 From: TuxPaper <725353+TuxPaper@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:32:02 -0800 Subject: [PATCH] Gradle 7.5->8 Upgrade breaks with projects (git modules) that have source in root of the module. Fix by creating empty projects and pointing the srcDirs to the existing git modules. Could just move the sources of each modules into a subdir, but I don't want to mess with non-android usage (desktop client, i18n projects, automations, etc) --- .idea/gradle.xml | 6 +- BiglyBT-plugin-aercm | 2 +- BiglyBT-plugin-azutp | 2 +- BiglyBT-plugin-xmwebui | 2 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- .../aercm/AndroidManifest.xml | 3 + modules-with-root-src/aercm/build.gradle | 58 ++++++++++++++++++ .../azutp/AndroidManifest.xml | 3 + modules-with-root-src/azutp/build.gradle | 59 ++++++++++++++++++ .../xmwebui/AndroidManifest.xml | 3 + modules-with-root-src/xmwebui/build.gradle | 60 +++++++++++++++++++ settings.gradle | 26 +++++--- 13 files changed, 211 insertions(+), 17 deletions(-) create mode 100644 modules-with-root-src/aercm/AndroidManifest.xml create mode 100644 modules-with-root-src/aercm/build.gradle create mode 100644 modules-with-root-src/azutp/AndroidManifest.xml create mode 100644 modules-with-root-src/azutp/build.gradle create mode 100644 modules-with-root-src/xmwebui/AndroidManifest.xml create mode 100644 modules-with-root-src/xmwebui/build.gradle diff --git a/.idea/gradle.xml b/.idea/gradle.xml index cdc039787..e11651b41 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -14,15 +14,15 @@ diff --git a/BiglyBT-plugin-aercm b/BiglyBT-plugin-aercm index ed40c620e..000974a7c 160000 --- a/BiglyBT-plugin-aercm +++ b/BiglyBT-plugin-aercm @@ -1 +1 @@ -Subproject commit ed40c620e390a1ac75e45dddd6e98b66ccb0aa55 +Subproject commit 000974a7c6fdeb0cd16c0666c6da857a468d83a1 diff --git a/BiglyBT-plugin-azutp b/BiglyBT-plugin-azutp index 2cacacf0a..1a37653e0 160000 --- a/BiglyBT-plugin-azutp +++ b/BiglyBT-plugin-azutp @@ -1 +1 @@ -Subproject commit 2cacacf0ab9b0cfd7d51cd17d535d55ad7e706ee +Subproject commit 1a37653e0750c3f42e725bca61515d446273b08b diff --git a/BiglyBT-plugin-xmwebui b/BiglyBT-plugin-xmwebui index 73a435fa6..b5759baac 160000 --- a/BiglyBT-plugin-xmwebui +++ b/BiglyBT-plugin-xmwebui @@ -1 +1 @@ -Subproject commit 73a435fa6d1ff7cb95a5378850bda54c748ee059 +Subproject commit b5759baac2857598ad78275ef55e1381a99f6527 diff --git a/build.gradle b/build.gradle index 246e252b6..6d6afacb1 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.1.4' // https://github.com/KeepSafe/dexcount-gradle-plugin classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f58fb6677..6b9f07162 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Aug 22 21:17:02 PDT 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/modules-with-root-src/aercm/AndroidManifest.xml b/modules-with-root-src/aercm/AndroidManifest.xml new file mode 100644 index 000000000..76073216e --- /dev/null +++ b/modules-with-root-src/aercm/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/modules-with-root-src/aercm/build.gradle b/modules-with-root-src/aercm/build.gradle new file mode 100644 index 000000000..4e37a28d7 --- /dev/null +++ b/modules-with-root-src/aercm/build.gradle @@ -0,0 +1,58 @@ +plugins { + id 'com.android.library' +} + +android { + namespace 'com.aelitis.plugins.rcmplugin' + compileSdk rootProject.ext.compileSdkVersion + + defaultConfig { + minSdkVersion 14 + multiDexEnabled true + } + + + compileOptions { + encoding = "UTF-8" + + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java { + srcDirs = [ + '../../BiglyBT-plugin-aercm' + ] + exclude 'com/aelitis/plugins/rcmplugin/RelatedContentUISWT**' + exclude 'com/aelitis/plugins/rcmplugin/SBC_RCMView*' + exclude 'com/aelitis/plugins/rcmplugin/RCM_SubViewHolder*' + exclude 'com/aelitis/plugins/rcmplugin/RCM_SubView*' + exclude 'com/aelitis/plugins/rcmplugin/columns/**' + } + + resources { + includes = [ + 'com/aelitis/plugins/rcmplugin/internat/*.properties', + 'com/aelitis/plugins/rcmplugin/resources/**' + ] + srcDirs = [ + '../../BiglyBT-plugin-aercm' + ] + exclude 'plugin.properties' + exclude 'build/**' + exclude 'build' + } + } + } + lint { + abortOnError false + } +} + +dependencies { + implementation project(path: ':core') +} diff --git a/modules-with-root-src/azutp/AndroidManifest.xml b/modules-with-root-src/azutp/AndroidManifest.xml new file mode 100644 index 000000000..76073216e --- /dev/null +++ b/modules-with-root-src/azutp/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/modules-with-root-src/azutp/build.gradle b/modules-with-root-src/azutp/build.gradle new file mode 100644 index 000000000..acc8cfcac --- /dev/null +++ b/modules-with-root-src/azutp/build.gradle @@ -0,0 +1,59 @@ +plugins { + id 'com.android.library' +} + +/* +To use this in Android Studio, place something like the following in your root settings.gradle + include ':BiglyBT-plugin-azutp' + project(':BiglyBT-plugin-azutp').buildFileName = 'android-build.gradle' +or, just rename this file to build.gradle +*/ + +android { + namespace 'com.vuze.client.plugins.utp' + compileSdk rootProject.ext.compileSdkVersion + + defaultConfig { + minSdkVersion 14 + multiDexEnabled true + } + + + compileOptions { + encoding = "UTF-8" + + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + + java { + srcDirs = [ + '../../BiglyBT-plugin-azutp' + ] + } + + resources { + includes = ['**/*.properties'] + srcDirs = [ + '../../BiglyBT-plugin-azutp' + ] + exclude 'plugin.properties' + exclude 'plugin_install.properties' + exclude 'build/**' + exclude 'build' + } + } + } + lint { + abortOnError false + } +} + +dependencies { + implementation project(path: ':core') +} diff --git a/modules-with-root-src/xmwebui/AndroidManifest.xml b/modules-with-root-src/xmwebui/AndroidManifest.xml new file mode 100644 index 000000000..76073216e --- /dev/null +++ b/modules-with-root-src/xmwebui/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/modules-with-root-src/xmwebui/build.gradle b/modules-with-root-src/xmwebui/build.gradle new file mode 100644 index 000000000..2251689e0 --- /dev/null +++ b/modules-with-root-src/xmwebui/build.gradle @@ -0,0 +1,60 @@ +plugins { + id 'com.android.library' +} + +/* +To use this in Android Studio, place something like the following in your root settings.gradle + include ':BiglyBT-plugin-xmwebui' + project(':BiglyBT-plugin-xmwebui').buildFileName = 'android-build.gradle' +or, just rename this file to build.gradle +*/ + +android { + namespace 'com.aelitis.azureus.plugins.xmwebui' + compileSdk rootProject.ext.compileSdkVersion + + defaultConfig { + minSdkVersion 14 + multiDexEnabled true + } + + + compileOptions { + encoding = "UTF-8" + + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + + java { + srcDirs = [ + '../../BiglyBT-plugin-xmwebui' + ] + exclude 'com/aelitis/azureus/plugins/xmwebui/swt/**' + exclude 'com/aelitis/azureus/plugins/xmwebui/console/**' + } + + resources { + includes = ['**/*.properties'] + srcDirs = [ + '../../BiglyBT-plugin-xmwebui' + ] + exclude "plugin.properties" + exclude 'build/**' + exclude 'build' + } + } + } + lint { + abortOnError false + } +} + +dependencies { + implementation project(path: ':core') +} diff --git a/settings.gradle b/settings.gradle index b17f1d5f0..c49471552 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,15 +1,23 @@ -include ':recyclerview-fastscroll', ':jiechic-tray', ':Android-DirectoryChooser' include ':app' + include ":net.i2p.android-helper" -project(':jiechic-tray').projectDir = new File('jiechic-tray-version/jiechic-tray') -project(':Android-DirectoryChooser').projectDir = new File('Android-DirectoryChooser/library') +include ':recyclerview-fastscroll' include ':core' include ':mldht' include ':BiglyBT-plugin-mlDHT' -include ":BiglyBT-plugin-aercm" -project(':BiglyBT-plugin-aercm').buildFileName = 'android-build.gradle' -include ':BiglyBT-plugin-xmwebui' -project(':BiglyBT-plugin-xmwebui').buildFileName = 'android-build.gradle' -include ':BiglyBT-plugin-azutp' -project(':BiglyBT-plugin-azutp').buildFileName = 'android-build.gradle' include ':BiglyBT-plugin-mlDHT-Java6' + +include ':jiechic-tray' +project(':jiechic-tray').projectDir = new File('jiechic-tray-version/jiechic-tray') + +include ':Android-DirectoryChooser' +project(':Android-DirectoryChooser').projectDir = new File('Android-DirectoryChooser/library') + +include 'BiglyBT-plugin-aercm' +project(':BiglyBT-plugin-aercm').projectDir = new File(rootDir, 'modules-with-root-src/aercm') + +include ':BiglyBT-plugin-xmwebui' +project(':BiglyBT-plugin-xmwebui').projectDir = new File(rootDir, 'modules-with-root-src/xmwebui') + +include 'BiglyBT-plugin-azutp' +project(':BiglyBT-plugin-azutp').projectDir = new File(rootDir, 'modules-with-root-src/azutp')