Compare commits

...
3 changed files with 70 additions and 18 deletions
+64
View File
@@ -46,6 +46,61 @@ subprojects {
}
}
task printUniquePluginsAndDependencies {
doLast {
def allItems = []
// Kotlin plugin version check
if (project.hasProperty('kotlinPluginVersion')) {
def kotlinVersion = project.kotlinPluginVersion
// since we are not using the plugins DSL we have to manually add this here
allItems.add("org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:$kotlinVersion")
}
allprojects { project ->
// Collect plugins
project.plugins.each { plugin ->
allItems.add(plugin.getClass().getName())
}
// Collect artifacts from the buildscript classpath
project.buildscript.configurations.classpath.resolvedConfiguration.resolvedArtifacts.each { artifact ->
allItems.add("${artifact.moduleVersion.id.group}:${artifact.name}:${artifact.moduleVersion.id.version}")
}
// Collect dependencies from all configurations, excluding 'test' configurations
project.configurations.each { config ->
if (!config.name.toLowerCase().startsWith('test')) {
try {
config.resolvedConfiguration.resolvedArtifacts.each { artifact ->
allItems.add("${artifact.moduleVersion.id.group}:${artifact.name}:${artifact.moduleVersion.id.version}")
}
} catch (Exception e) {
// Handle the case where a configuration is not resolvable
}
}
}
}
// Filter out specific dependencies and invalid entries
def filteredItems = allItems.findAll { item ->
!item.startsWith("StatusIm:") && // to strip out status-im:status-go:ea3e59f
!item.startsWith("status-im:") && // to strip out StatusIm:react-native-touch-id:unspecified
!item.contains("null") && // to strip out com.facebook.react:react-android:null
!item.contains("unspecified") && // to strip out com.facebook.react:react-native-gradle-plugin:unspecified
!item.endsWith("Inject") && // to strip out org.gradle.api.plugins.BasePlugin$Inject
!item.endsWith("ReactPlugin") && // to strip out com.facebook.react.ReactPlugin
!item.endsWith("DownloadTaskPlugin") && // to strip out de.undercouch.gradle.tasks.download.DownloadTaskPlugin
!item.endsWith("KotlinAndroidPluginWrapper") && // to strip out org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper
!item.contains("com.android.build.gradle.") // to strip out com.android.build.gradle.AppPlugin
}
// Remove duplicates & sort
filteredItems.unique().sort().each {
println it
}
}
}
allprojects {
beforeEvaluate {
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
@@ -63,3 +118,12 @@ allprojects {
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}
}
}
allprojects {
apply plugin: 'project-report'
task('allDependencies', type: org.gradle.api.tasks.diagnostics.DependencyReportTask) {
// Depend on the evaluation of child projects to ensure all configurations are available
evaluationDependsOnChildren()
}
}
-18
View File
@@ -38,23 +38,6 @@ function gen_deps_list() {
echo -e "${CLR}Found ${GRN}$(wc -l < "${DEPS_LIST}")${RST} direct dependencies..."
}
# FIXME: Temporary fix for missing packages.
# https://github.com/status-im/status-mobile/issues/15447
function add_deps_hack() {
echo -n \
'com.android.tools.build:gradle:1.3.1
com.squareup.okio:okio:1.13.0
com.squareup.okio:okio:1.15.0
com.squareup.okhttp3:okhttp:3.12.1
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22
com.android.tools.lint:lint-gradle:30.4.2
com.android.tools.build:gradle:7.4.2
com.android.tools.build:aapt2:7.4.2-8841542
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.9.0' \
>> "${DEPS_LIST}"
}
# Find download URLs for each dependency.
function gen_deps_urls() {
go-maven-resolver < "${DEPS_LIST}" | sort -uV -o "${DEPS_URLS}"
@@ -99,7 +82,6 @@ fi
# Run each stage in order
gen_proj_list
gen_deps_list
add_deps_hack
gen_deps_urls
gen_deps_json
+6
View File
@@ -13,6 +13,7 @@ stdenv.mkDerivation {
"patchKeyChainPhase"
"patchGlogPhase"
"patchBoostPodSpec"
"patchRNGradlePluginPhase"
"installPhase"
];
@@ -86,6 +87,11 @@ stdenv.mkDerivation {
'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2' \
'';
patchRNGradlePluginPhase = ''
substituteInPlace ./node_modules/@react-native/gradle-plugin/build.gradle.kts \
--replace '1.7.22' '1.9.0'
'';
# The ELF types are incompatible with the host platform, so let's not even try
# TODO: Use Android NDK to strip binaries manually
dontPatchELF = true;