diff --git a/.reuse/dep5 b/.reuse/dep5 index 30fbe0cf..55e562f3 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -66,6 +66,18 @@ Files: tests/test_android/* Copyright: 2018 Google, Inc License: Apache-2.0 +Files: tests/test_android2/* +Copyright: 2018 Google, Inc +License: Apache-2.0 + +Files: tests/test_kotlin/* +Copyright: 2018 Google, Inc +License: Apache-2.0 + +Files: tests/test_kotlin2/* +Copyright: 2018 Google, Inc +License: Apache-2.0 + Files: tests/test_swift/* Copyright: 2021 LG Electronics License: Apache-2.0 diff --git a/src/fosslight_dependency/_package_manager.py b/src/fosslight_dependency/_package_manager.py index 1a870f6a..d87554ca 100644 --- a/src/fosslight_dependency/_package_manager.py +++ b/src/fosslight_dependency/_package_manager.py @@ -67,7 +67,7 @@ def __del__(self): def run_plugin(self): ret = True - if self.package_manager_name == const.GRADLE or self.package_manager_name == const.ANDROID: + if self.package_manager_name in (const.GRADLE, const.ANDROID): ret = self.run_gradle_task() else: logger.info(f"This package manager({self.package_manager_name}) skips the step to run plugin.") @@ -87,128 +87,186 @@ def parse_direct_dependencies(self): def run_gradle_task(self): ret_task = True - if os.path.isfile(const.SUPPORT_PACKAE.get(self.package_manager_name)): - gradle_backup = f'{const.SUPPORT_PACKAE.get(self.package_manager_name)}_bk' - - shutil.copy(const.SUPPORT_PACKAE.get(self.package_manager_name), gradle_backup) - ret_alldeps = self.add_allDeps_in_gradle() - - ret_plugin = False - if (self.package_manager_name == const.ANDROID): - module_build_gradle = os.path.join(self.app_name, const.SUPPORT_PACKAE.get(self.package_manager_name)) - module_gradle_backup = f'{module_build_gradle}_bk' - if os.path.isfile(module_build_gradle) and (not os.path.isfile(self.input_file_name)): - shutil.copy(module_build_gradle, module_gradle_backup) - ret_plugin = self.add_android_plugin_in_gradle(module_build_gradle) - - if os.path.isfile('gradlew') or os.path.isfile('gradlew.bat'): - if self.platform == const.WINDOWS: - cmd_gradle = "gradlew.bat" - else: - cmd_gradle = "./gradlew" + prev_dir = os.getcwd() + gradle_file = '' + gradle_backup = '' + module_build_gradle = '' + module_gradle_backup = '' + os.chdir(self.input_dir) + try: + candidates = const.SUPPORT_PACKAGE.get(self.package_manager_name, '') + if isinstance(candidates, list): + gradle_file = next((f for f in candidates if os.path.isfile(f)), '') else: - ret_task = False - self.set_direct_dependencies(False) - logger.warning('No gradlew file exists (Skip to find dependencies relationship.).') - if ret_plugin: - logger.warning('Also it cannot run android-dependency-scanning plugin.') - if ret_task: - current_mode = change_file_mode(cmd_gradle) - if ret_alldeps: - cmd = f"{cmd_gradle} allDeps" - try: - ret = subprocess.check_output(cmd, shell=True, encoding='utf-8') - if ret != 0: - self.parse_dependency_tree(ret) - else: + gradle_file = candidates + if os.path.isfile(gradle_file): + gradle_backup = f'{gradle_file}_bk' + + shutil.copy(gradle_file, gradle_backup) + ret_alldeps = self.add_allDeps_in_gradle(gradle_file) + + ret_plugin = False + if self.package_manager_name == const.ANDROID: + module_build_gradle = os.path.join(self.app_name, gradle_file) + module_gradle_backup = f'{module_build_gradle}_bk' + if os.path.isfile(module_build_gradle) and (not os.path.isfile(self.input_file_name)): + shutil.copy(module_build_gradle, module_gradle_backup) + ret_plugin = self.add_android_plugin_in_gradle(module_build_gradle, gradle_file) + + cmd_gradle = '' + if os.path.isfile('gradlew') or os.path.isfile('gradlew.bat'): + if self.platform == const.WINDOWS: + cmd_gradle = "gradlew.bat" + else: + cmd_gradle = "./gradlew" + else: + ret_task = False + self.set_direct_dependencies(False) + logger.warning('No gradlew file exists (Skip to find dependencies relationship.).') + if ret_plugin: + logger.warning('Also it cannot run android-dependency-scanning plugin.') + + if ret_task: + current_mode = change_file_mode(cmd_gradle) + if ret_alldeps: + cmd = [cmd_gradle, 'allDeps'] + try: + ret = subprocess.check_output(cmd, encoding='utf-8') + if ret: + self.parse_dependency_tree(ret) + else: + self.set_direct_dependencies(False) + logger.warning(f"Fail to run {cmd}") + except Exception as e: self.set_direct_dependencies(False) - logger.warning(f"Fail to run {cmd}") - except Exception as e: - self.set_direct_dependencies(False) - logger.warning(f"Cannot print 'depends on' information. (fail {cmd}: {e})") - - if ret_plugin: - cmd = f"{cmd_gradle} generateLicenseTxt" - try: - ret = subprocess.check_output(cmd, shell=True, encoding='utf-8') - if ret == 0: + logger.warning(f"Cannot print 'depends on' information. (fail {cmd}: {e})") + + if ret_plugin: + cmd = [cmd_gradle, f':{self.app_name}:generateLicenseTxt'] + try: + result = subprocess.run(cmd, capture_output=True, encoding='utf-8') + if result.returncode != 0: + ret_task = False + logger.error(f'Fail to run {cmd}: {result.stderr.strip()}') + if os.path.isfile(self.input_file_name): + logger.info('Automatically run android-dependency-scanning plugin and generate output.') + self.plugin_auto_run = True + else: + logger.warning( + 'Automatically run android-dependency-scanning plugin, but fail to generate output.' + ) + except Exception as e: + logger.error(f'Fail to run {cmd}: {e}') ret_task = False - logger.error(f'Fail to run {cmd}') - if os.path.isfile(self.input_file_name): - logger.info('Automatically run android-dependency-scanning plugin and generate output.') - self.plugin_auto_run = True - else: - logger.warning('Automatically run android-dependency-scanning plugin, but fail to generate output.') - except Exception as e: - logger.error(f'Fail to run {cmd}: {e}') - ret_task = False - change_file_mode(cmd_gradle, current_mode) - - if os.path.isfile(gradle_backup): - os.remove(const.SUPPORT_PACKAE.get(self.package_manager_name)) - shutil.move(gradle_backup, const.SUPPORT_PACKAE.get(self.package_manager_name)) - - if (self.package_manager_name == const.ANDROID): - if os.path.isfile(module_gradle_backup): + change_file_mode(cmd_gradle, current_mode) + + if os.path.isfile(self.input_file_name): + logger.info(f'Found {self.input_file_name}, skip to run plugin.') + self.set_direct_dependencies(False) + ret_task = True + except Exception as e: + logger.error(f'Unexpected error in run_gradle_task: {e}') + ret_task = False + finally: + if gradle_backup and os.path.isfile(gradle_backup): + if gradle_file and os.path.isfile(gradle_file): + os.remove(gradle_file) + shutil.move(gradle_backup, gradle_file) + if module_gradle_backup and os.path.isfile(module_gradle_backup): + if module_build_gradle and os.path.isfile(module_build_gradle): os.remove(module_build_gradle) - shutil.move(module_gradle_backup, module_build_gradle) - if os.path.isfile(self.input_file_name): - logger.info(f'Found {self.input_file_name}, skip to run plugin.') - self.set_direct_dependencies(False) - ret_task = True + shutil.move(module_gradle_backup, module_build_gradle) + os.chdir(prev_dir) + return ret_task - def add_android_plugin_in_gradle(self, module_build_gradle): - ret = False - build_script = '''buildscript { - repositories { - mavenCentral() - } - dependencies { - //Android dependency scanning Plugin - classpath 'org.fosslight:android-dependency-scanning:+' - } - }''' - apply = "apply plugin: 'org.fosslight'\n" + def add_android_plugin_in_gradle(self, module_build_gradle, gradle_file): + is_kts = gradle_file == 'build.gradle.kts' + if is_kts: + apply = 'apply(plugin = "org.fosslight")\n' + plugin_classpath = ' classpath("org.fosslight:android-dependency-scanning:+")' + else: + apply = "apply plugin: 'org.fosslight'\n" + plugin_classpath = " classpath 'org.fosslight:android-dependency-scanning:+'" + + complete_buildscript = ( + "buildscript {\n" + " repositories {\n" + " mavenCentral()\n" + " }\n" + " dependencies {\n" + f"{plugin_classpath}\n" + " }\n" + "}\n" + ) try: - with open(const.SUPPORT_PACKAE.get(self.package_manager_name), 'r', encoding='utf-8') as original: - data = original.read() - with open(const.SUPPORT_PACKAE.get(self.package_manager_name), 'w', encoding='utf-8') as modified: - modified.write(f"{build_script}\n{data}") - ret = True + with open(gradle_file, 'r', encoding='utf-8') as f: + data = f.read() + if 'buildscript {' in data: + bs_start = data.index('buildscript {') + bs_block = data[bs_start:] + if 'dependencies {' in bs_block: + dep_pos = bs_start + bs_block.index('dependencies {') + len('dependencies {') + data = data[:dep_pos] + f'\n{plugin_classpath}' + data[dep_pos:] + else: + data = data.replace( + 'buildscript {', + f'buildscript {{\n dependencies {{\n{plugin_classpath}\n }}', + 1 + ) + else: + data = complete_buildscript + data + with open(gradle_file, 'w', encoding='utf-8') as f: + f.write(data) except Exception as e: logging.warning(f"Cannot add the buildscript task in build.gradle: {e}") + return False try: - with open(module_build_gradle, 'a', encoding='utf-8') as modified: - modified.write(f'\n{apply}\n') - ret = True + with open(module_build_gradle, 'a', encoding='utf-8') as f: + f.write(f'\n{apply}\n') + return True except Exception as e: logging.warning(f"Cannot add the apply plugin in {module_build_gradle}: {e}") - return ret - - def add_allDeps_in_gradle(self): - ret = False - config = android_config if self.package_manager_name == 'android' else gradle_config - configuration = ','.join([f'project.configurations.{c}' for c in config]) - - allDeps = f'''allprojects {{ - task allDeps(type: DependencyReportTask) {{ - doFirst{{ - try {{ - configurations = [{configuration}] as Set }} - catch(UnknownConfigurationException) {{}} + return False + + def add_allDeps_in_gradle(self, gradle_file): + config = android_config if self.package_manager_name == const.ANDROID else gradle_config + is_kts = gradle_file == 'build.gradle.kts' + if is_kts: + configuration = '\n'.join([ + f' try {{ cfgs.add(project.configurations.getByName("{c}")) }} catch (e: Exception) {{}}' + for c in config + ]) + allDeps = f''' + allprojects {{ + tasks.register("allDeps", org.gradle.api.tasks.diagnostics.DependencyReportTask::class) {{ + doFirst {{ + val cfgs = mutableSetOf() + {configuration} + setConfigurations(cfgs) + }} + }} + }}''' + else: + configuration = ','.join([f'project.configurations.{c}' for c in config]) + allDeps = f''' + allprojects {{ + task allDeps(type: DependencyReportTask) {{ + doFirst{{ + try {{ + configurations = [{configuration}] as Set }} + catch(UnknownConfigurationException) {{}} + }} }} - }} }}''' try: - with open(const.SUPPORT_PACKAE.get(self.package_manager_name), 'a', encoding='utf8') as f: + with open(gradle_file, 'a', encoding='utf8') as f: f.write(f'\n{allDeps}\n') - ret = True + return True except Exception as e: logging.warning(f"Cannot add the allDeps task in build.gradle: {e}") - - return ret + return False def create_dep_stack(self, dep_line, config): packages_in_config = False @@ -247,7 +305,8 @@ def create_dep_stack(self, dep_line, config): logger.warning(f"Failed to parse dependency tree: {e}") def parse_dependency_tree(self, f_name): - config = android_config if self.package_manager_name == 'android' else gradle_config + config = android_config if self.package_manager_name == const.ANDROID else gradle_config + try: for stack, name in self.create_dep_stack(f_name, config): self.total_dep_list.append(name) @@ -416,10 +475,10 @@ def collect_gradle_download_urls(input_dir, package_manager_name, app_name=None) return download_url_map try: if app_name: - cmd = f"{cmd_gradle} :{app_name}:dependencies --refresh-dependencies --debug" + cmd = [cmd_gradle, f':{app_name}:dependencies', '--refresh-dependencies', '--debug'] else: - cmd = f"{cmd_gradle} dependencies --debug" - proc = subprocess.run(cmd, shell=True, capture_output=True, text=True, cwd=input_dir, timeout=600) + cmd = [cmd_gradle, 'dependencies', '--debug'] + proc = subprocess.run(cmd, capture_output=True, text=True, cwd=input_dir, timeout=600) if proc.returncode == 0: download_url_map = parse_gradle_download_lines(proc.stdout, package_manager_name) else: @@ -468,7 +527,10 @@ def parse_gradle_download_lines(stdout_text, package_manager_name=''): break if group_start_idx is None: - repo_keywords = ['maven2', 'maven', 'repository', 'nexus', 'content', 'groups', 'public', 'releases', 'snapshots'] + repo_keywords = [ + 'maven2', 'maven', 'repository', 'nexus', 'content', + 'groups', 'public', 'releases', 'snapshots' + ] group_parts = [] for i in range(art_idx - 1, 2, -1): part = parts[i] diff --git a/src/fosslight_dependency/constant.py b/src/fosslight_dependency/constant.py index 290f793f..77686e91 100644 --- a/src/fosslight_dependency/constant.py +++ b/src/fosslight_dependency/constant.py @@ -28,7 +28,7 @@ YARN = 'yarn' # Supported package name and manifest file -SUPPORT_PACKAE = { +SUPPORT_PACKAGE = { PYPI: ['requirements.txt', 'setup.py', 'pyproject.toml'], PNPM: 'pnpm-lock.yaml', NPM: 'package.json', @@ -37,7 +37,7 @@ GRADLE: 'build.gradle', PUB: 'pubspec.yaml', COCOAPODS: 'Podfile.lock', - ANDROID: 'build.gradle', + ANDROID: ['build.gradle', 'build.gradle.kts'], SWIFT: 'Package.resolved', CARTHAGE: 'Cartfile.resolved', GO: 'go.mod', diff --git a/src/fosslight_dependency/package_manager/Android.py b/src/fosslight_dependency/package_manager/Android.py index 478ede4d..f766fa24 100644 --- a/src/fosslight_dependency/package_manager/Android.py +++ b/src/fosslight_dependency/package_manager/Android.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 import os +import shutil import logging import fosslight_util.constant as constant import fosslight_dependency.constant as const @@ -23,6 +24,8 @@ class Android(PackageManager): app_name = const.default_app_name input_file_name = '' plugin_auto_run = False + input_file_preexisted = False + gradle_cache_preexisted = False def __init__(self, input_dir, output_dir, app_name): super().__init__(self.package_manager_name, '', input_dir, output_dir) @@ -30,12 +33,21 @@ def __init__(self, input_dir, output_dir, app_name): if app_name: self.app_name = app_name self.input_file_name = self.check_input_path() + self.input_file_preexisted = os.path.isfile(self.input_file_name) + self.gradle_cache_dir = os.path.join(os.path.abspath(input_dir), '.gradle') + self.gradle_cache_preexisted = os.path.isdir(self.gradle_cache_dir) self.append_input_package_list_file(self.input_file_name) def __del__(self): - if self.plugin_auto_run: + if self.plugin_auto_run and not self.input_file_preexisted: if os.path.isfile(self.input_file_name): os.remove(self.input_file_name) + if not self.gradle_cache_preexisted and os.path.isdir(self.gradle_cache_dir): + try: + shutil.rmtree(self.gradle_cache_dir) + logger.debug(f'Removed gradle cache directory: {self.gradle_cache_dir}') + except Exception as e: + logger.warning(f'Failed to remove gradle cache directory: {e}') def check_input_path(self): if os.path.isfile(self.plugin_output_file): diff --git a/src/fosslight_dependency/package_manager/Cargo.py b/src/fosslight_dependency/package_manager/Cargo.py index 675ee938..9172b209 100644 --- a/src/fosslight_dependency/package_manager/Cargo.py +++ b/src/fosslight_dependency/package_manager/Cargo.py @@ -39,8 +39,8 @@ def run_plugin(self): logger.info(f"Found {self.input_file_name}, skip the flutter cmd to analyze dependency.") return True - if not os.path.exists(const.SUPPORT_PACKAE.get(self.package_manager_name)): - logger.error(f"Cannot find the file({const.SUPPORT_PACKAE.get(self.package_manager_name)})") + if not os.path.exists(const.SUPPORT_PACKAGE.get(self.package_manager_name)): + logger.error(f"Cannot find the file({const.SUPPORT_PACKAGE.get(self.package_manager_name)})") return False if os.path.exists(self.cargo_lock_f): diff --git a/src/fosslight_dependency/package_manager/Carthage.py b/src/fosslight_dependency/package_manager/Carthage.py index 6d08fd57..03070ab4 100644 --- a/src/fosslight_dependency/package_manager/Carthage.py +++ b/src/fosslight_dependency/package_manager/Carthage.py @@ -26,7 +26,7 @@ class Carthage(PackageManager): package_manager_name = const.CARTHAGE - input_file_name = const.SUPPORT_PACKAE.get(package_manager_name) + input_file_name = const.SUPPORT_PACKAGE.get(package_manager_name) dn_url = "https://github.com/" def __init__(self, input_dir, output_dir, github_token): diff --git a/src/fosslight_dependency/package_manager/Cocoapods.py b/src/fosslight_dependency/package_manager/Cocoapods.py index 273983f5..8ea2086a 100644 --- a/src/fosslight_dependency/package_manager/Cocoapods.py +++ b/src/fosslight_dependency/package_manager/Cocoapods.py @@ -26,7 +26,7 @@ class Cocoapods(PackageManager): package_manager_name = const.COCOAPODS dn_url = 'https://cocoapods.org/' - input_file_name = const.SUPPORT_PACKAE.get(package_manager_name) + input_file_name = const.SUPPORT_PACKAGE.get(package_manager_name) def __init__(self, input_dir, output_dir): super().__init__(self.package_manager_name, self.dn_url, input_dir, output_dir) diff --git a/src/fosslight_dependency/package_manager/Helm.py b/src/fosslight_dependency/package_manager/Helm.py index fa9adc3e..fdb1f585 100644 --- a/src/fosslight_dependency/package_manager/Helm.py +++ b/src/fosslight_dependency/package_manager/Helm.py @@ -22,7 +22,7 @@ class Helm(PackageManager): package_manager_name = const.HELM tmp_charts_dir = 'tmp_charts' - input_file_name = const.SUPPORT_PACKAE.get(package_manager_name) + input_file_name = const.SUPPORT_PACKAGE.get(package_manager_name) def __init__(self, input_dir, output_dir): super().__init__(self.package_manager_name, '', input_dir, output_dir) diff --git a/src/fosslight_dependency/package_manager/Maven.py b/src/fosslight_dependency/package_manager/Maven.py index ae9bf63c..d5c42482 100644 --- a/src/fosslight_dependency/package_manager/Maven.py +++ b/src/fosslight_dependency/package_manager/Maven.py @@ -58,7 +58,7 @@ def run_plugin(self): self.is_run_plugin = True if os.path.isfile(pom_backup): - shutil.move(pom_backup, const.SUPPORT_PACKAE.get(self.package_manager_name)) + shutil.move(pom_backup, const.SUPPORT_PACKAGE.get(self.package_manager_name)) else: self.set_direct_dependencies(False) @@ -69,7 +69,7 @@ def add_plugin_in_pom(self, pom_backup): xml = 'xml' f_content = None - manifest_file = const.SUPPORT_PACKAE.get(self.package_manager_name) + manifest_file = const.SUPPORT_PACKAGE.get(self.package_manager_name) if os.path.isfile(manifest_file) != 1: logger.error(f"{manifest_file} is not existed in this directory.") return ret diff --git a/src/fosslight_dependency/package_manager/Npm.py b/src/fosslight_dependency/package_manager/Npm.py index 4bb6d8ac..67bb3620 100644 --- a/src/fosslight_dependency/package_manager/Npm.py +++ b/src/fosslight_dependency/package_manager/Npm.py @@ -177,7 +177,7 @@ def parse_direct_dependencies(self): if not self.direct_dep: return try: - if os.path.isfile(const.SUPPORT_PACKAE.get(self.package_manager_name)): + if os.path.isfile(const.SUPPORT_PACKAGE.get(self.package_manager_name)): ret, err_msg = self.parse_transitive_relationship() if not ret: self.direct_dep = False @@ -252,7 +252,7 @@ def parse_oss_information(self, f_name): if f'{oss_init_name}({oss_item.version})' in self.relation_tree: dep_item.depends_on_raw = self.relation_tree[f'{oss_init_name}({oss_item.version})'] - manifest_file_path = os.path.join(package_path, const.SUPPORT_PACKAE.get(self.package_manager_name)) + manifest_file_path = os.path.join(package_path, const.SUPPORT_PACKAGE.get(self.package_manager_name)) multi_license, license_comment, multi_flag = check_multi_license(license_name, manifest_file_path) if multi_flag: diff --git a/src/fosslight_dependency/package_manager/Nuget.py b/src/fosslight_dependency/package_manager/Nuget.py index c89fd70c..b004e796 100644 --- a/src/fosslight_dependency/package_manager/Nuget.py +++ b/src/fosslight_dependency/package_manager/Nuget.py @@ -33,7 +33,7 @@ class Nuget(PackageManager): def __init__(self, input_dir, output_dir): super().__init__(self.package_manager_name, self.dn_url, input_dir, output_dir) - for manifest_i in const.SUPPORT_PACKAE.get(self.package_manager_name): + for manifest_i in const.SUPPORT_PACKAGE.get(self.package_manager_name): if os.path.exists(os.path.basename(manifest_i)): self.append_input_package_list_file(os.path.basename(manifest_i)) if manifest_i != 'packages.config': diff --git a/src/fosslight_dependency/package_manager/Pub.py b/src/fosslight_dependency/package_manager/Pub.py index e2e63065..e8c29bf6 100644 --- a/src/fosslight_dependency/package_manager/Pub.py +++ b/src/fosslight_dependency/package_manager/Pub.py @@ -31,15 +31,15 @@ def __init__(self, input_dir, output_dir): self.pkg_source_list = {} self.name_version_dict = {} self.pkg_details = {} - self.append_input_package_list_file(const.SUPPORT_PACKAE.get(self.package_manager_name)) + self.append_input_package_list_file(const.SUPPORT_PACKAGE.get(self.package_manager_name)) def __del__(self): if self.cur_path != '': os.chdir(self.cur_path) def run_plugin(self): - if not os.path.exists(const.SUPPORT_PACKAE.get(self.package_manager_name)): - logger.error(f"Cannot find the file({const.SUPPORT_PACKAE.get(self.package_manager_name)})") + if not os.path.exists(const.SUPPORT_PACKAGE.get(self.package_manager_name)): + logger.error(f"Cannot find the file({const.SUPPORT_PACKAGE.get(self.package_manager_name)})") return False return True diff --git a/src/fosslight_dependency/package_manager/Pypi.py b/src/fosslight_dependency/package_manager/Pypi.py index e4865081..72d0fbea 100644 --- a/src/fosslight_dependency/package_manager/Pypi.py +++ b/src/fosslight_dependency/package_manager/Pypi.py @@ -162,7 +162,7 @@ def create_virtualenv(self): manifest_files = self.manifest_file_name if not manifest_files: - manifest_files = copy.deepcopy(const.SUPPORT_PACKAE[self.package_manager_name]) + manifest_files = copy.deepcopy(const.SUPPORT_PACKAGE[self.package_manager_name]) self.set_manifest_file(manifest_files) install_cmd_list = [] @@ -190,9 +190,9 @@ def create_virtualenv(self): if install_cmd_list: install_cmd = cmd_separator.join(install_cmd_list) else: - logger.error(const.SUPPORT_PACKAE[self.package_manager_name]) + logger.error(const.SUPPORT_PACKAGE[self.package_manager_name]) logger.error('Cannot create virtualenv because it cannot find: ' - + ', '.join(const.SUPPORT_PACKAE[self.package_manager_name])) + + ', '.join(const.SUPPORT_PACKAGE[self.package_manager_name])) logger.error("Please run with '-a' and '-d' option.") return False diff --git a/src/fosslight_dependency/package_manager/Swift.py b/src/fosslight_dependency/package_manager/Swift.py index 3a8feaa7..ba811321 100644 --- a/src/fosslight_dependency/package_manager/Swift.py +++ b/src/fosslight_dependency/package_manager/Swift.py @@ -21,7 +21,7 @@ class Swift(PackageManager): package_manager_name = const.SWIFT - input_file_name = const.SUPPORT_PACKAE.get(package_manager_name) + input_file_name = const.SUPPORT_PACKAGE.get(package_manager_name) tmp_dep_tree_fname = 'show-dep.json' def __init__(self, input_dir, output_dir, github_token): diff --git a/src/fosslight_dependency/package_manager/Unity.py b/src/fosslight_dependency/package_manager/Unity.py index ee8ed5a7..f886ade3 100644 --- a/src/fosslight_dependency/package_manager/Unity.py +++ b/src/fosslight_dependency/package_manager/Unity.py @@ -24,7 +24,7 @@ class Unity(PackageManager): package_manager_name = const.UNITY - input_file_name = const.SUPPORT_PACKAE.get(package_manager_name) + input_file_name = const.SUPPORT_PACKAGE.get(package_manager_name) packageCache_dir = os.path.join('Library', 'PackageCache') mirror_url = 'https://github.com/needle-mirror/' unity_internal_url = 'https://github.cds.internal.unity3d.com' diff --git a/src/fosslight_dependency/run_dependency_scanner.py b/src/fosslight_dependency/run_dependency_scanner.py index a0948791..f4468449 100755 --- a/src/fosslight_dependency/run_dependency_scanner.py +++ b/src/fosslight_dependency/run_dependency_scanner.py @@ -33,7 +33,7 @@ def find_package_manager(input_dir, path_to_exclude=[], manifest_file_name=[], recursive=False, excluded_files=[]): ret = True if not manifest_file_name: - for value in const.SUPPORT_PACKAE.values(): + for value in const.SUPPORT_PACKAGE.values(): if isinstance(value, list): manifest_file_name.extend(value) else: @@ -98,7 +98,7 @@ def find_package_manager(input_dir, path_to_exclude=[], manifest_file_name=[], r for f_with_path in found_manifest_file: f_name = os.path.basename(f_with_path) dir_path = os.path.dirname(f_with_path) - for key, value in const.SUPPORT_PACKAE.items(): + for key, value in const.SUPPORT_PACKAGE.items(): manifest_patterns = value if isinstance(value, list) else [value] for pattern in manifest_patterns: @@ -266,7 +266,7 @@ def run_dependency_scanner(package_manager='', input_dir='', output_dir_file='', if package_manager: scan_item.set_cover_comment(f"Manual detect mode (-m {package_manager})") autodetect = False - support_packagemanager = list(const.SUPPORT_PACKAE.keys()) + support_packagemanager = list(const.SUPPORT_PACKAGE.keys()) if package_manager not in support_packagemanager: logger.error(f"(-m option) You entered the unsupported package manager({package_manager}).") @@ -274,7 +274,7 @@ def run_dependency_scanner(package_manager='', input_dir='', output_dir_file='', .format(", ".join(support_packagemanager))) return False, scan_item manifest_file_name = [] - value = const.SUPPORT_PACKAE[package_manager] + value = const.SUPPORT_PACKAGE[package_manager] if isinstance(value, list): manifest_file_name.extend(value) else: @@ -312,7 +312,7 @@ def run_dependency_scanner(package_manager='', input_dir='', output_dir_file='', suggested_files_str.append("Please check the following files and try again:") for f in suggested_files: pm = const.SUGGESTED_PACKAGE[f.split(os.path.sep)[-1]] - suggested_files_str.append(f"\t\t\t{f} ({pm}) detected, but {const.SUPPORT_PACKAE[pm]} missing.") + suggested_files_str.append(f"\t\t\t{f} ({pm}) detected, but {const.SUPPORT_PACKAGE[pm]} missing.") suggested_files_str.append("\t\t\tRefer: https://fosslight.org/fosslight-guide-en/scanner/1_dependency.html") scan_item.set_cover_comment('\n'.join(suggested_files_str)) diff --git a/tests/test_android2/sunflower/app/build.gradle b/tests/test_android2/sunflower/app/build.gradle new file mode 100644 index 00000000..88d1afcd --- /dev/null +++ b/tests/test_android2/sunflower/app/build.gradle @@ -0,0 +1,119 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-kapt' +apply plugin: 'dagger.hilt.android.plugin' +apply plugin: 'androidx.navigation.safeargs.kotlin' +apply plugin: 'org.fosslight' + +android { + compileSdkVersion rootProject.compileSdkVersion + buildFeatures { + dataBinding true + } + defaultConfig { + applicationId "com.google.samples.apps.sunflower" + minSdkVersion rootProject.minSdkVersion + targetSdkVersion rootProject.targetSdkVersion + testInstrumentationRunner "com.google.samples.apps.sunflower.utilities.MainTestRunner" + versionCode 1 + versionName "0.1.6" + vectorDrawables.useSupportLibrary true + + // Consult the README on instructions for setting up Unsplash API key + buildConfigField("String", "UNSPLASH_ACCESS_KEY", "\"" + getUnsplashAccess() + "\"") + javaCompileOptions { + annotationProcessorOptions { + arguments["dagger.hilt.disableModulesHaveInstallInCheck"] = "true" + } + } + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + // work-runtime-ktx 2.1.0 and above now requires Java 8 + jvmTarget = "1.8" + + // Enable Coroutines and Flow APIs + freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" + freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.FlowPreview" + } + packagingOptions { + // Multiple dependency bring these files in. Exclude them to enable + // our test APK to build (has no effect on our AARs) + excludes += "/META-INF/AL2.0" + excludes += "/META-INF/LGPL2.1" + } +} + +dependencies { + kapt "androidx.room:room-compiler:$rootProject.roomVersion" + kapt "com.github.bumptech.glide:compiler:$rootProject.glideVersion" + kapt "com.google.dagger:hilt-android-compiler:$rootProject.hiltVersion" + implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion" + implementation "androidx.constraintlayout:constraintlayout:$rootProject.constraintLayoutVersion" + implementation "androidx.core:core-ktx:$rootProject.ktxVersion" + implementation "androidx.fragment:fragment-ktx:$rootProject.fragmentVersion" + implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion" + implementation "androidx.lifecycle:lifecycle-livedata-ktx:$rootProject.lifecycleVersion" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycleVersion" + implementation "androidx.navigation:navigation-fragment-ktx:$rootProject.navigationVersion" + implementation "androidx.navigation:navigation-ui-ktx:$rootProject.navigationVersion" + implementation "androidx.paging:paging-runtime-ktx:$rootProject.pagingVersion" + implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerViewVersion" + implementation "androidx.room:room-runtime:$rootProject.roomVersion" + implementation "androidx.room:room-ktx:$rootProject.roomVersion" + implementation "androidx.viewpager2:viewpager2:$rootProject.viewPagerVersion" + implementation "androidx.work:work-runtime-ktx:$rootProject.workVersion" + implementation "com.github.bumptech.glide:glide:$rootProject.glideVersion" + implementation "com.google.android.material:material:$rootProject.materialVersion" + implementation "com.google.code.gson:gson:$rootProject.gsonVersion" + implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.okhttpLoggingVersion" + implementation "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion" + implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutinesVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutinesVersion" + implementation "com.google.dagger:hilt-android:$rootProject.hiltVersion" + + // Testing dependencies + kaptAndroidTest "com.google.dagger:hilt-android-compiler:$rootProject.hiltVersion" + androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion" + androidTestImplementation "androidx.test.espresso:espresso-contrib:$rootProject.espressoVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion" + androidTestImplementation "androidx.test.espresso:espresso-intents:$rootProject.espressoVersion" + androidTestImplementation "androidx.test.ext:junit:$rootProject.testExtJunit" + androidTestImplementation "androidx.test.uiautomator:uiautomator:$rootProject.uiAutomatorVersion" + androidTestImplementation "androidx.work:work-testing:$rootProject.workVersion" + androidTestImplementation "com.google.truth:truth:$rootProject.truthVersion" + androidTestImplementation "com.google.dagger:hilt-android-testing:$rootProject.hiltVersion" + androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$rootProject.coroutinesVersion" + testImplementation "junit:junit:$rootProject.junitVersion" +} + +def getUnsplashAccess() { + return project.findProperty("unsplash_access_key") +} diff --git a/tests/test_android2/sunflower/build.gradle b/tests/test_android2/sunflower/build.gradle new file mode 100644 index 00000000..09a85934 --- /dev/null +++ b/tests/test_android2/sunflower/build.gradle @@ -0,0 +1,86 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +buildscript { + // Define versions in a single place + ext { + // Sdk and tools + compileSdkVersion = 31 + minSdkVersion = 21 + targetSdkVersion = 30 + + // App dependencies + appCompatVersion = '1.1.0' + constraintLayoutVersion = '2.0.0-beta3' + coreTestingVersion = '2.0.0' + coroutinesVersion = "1.4.2" + espressoVersion = '3.1.1' + fragmentVersion = '1.3.0' + glideVersion = '4.10.0' + gradleVersion = '7.2.0' + gsonVersion = '2.8.2' + hiltVersion = '2.41' + junitVersion = '4.12' + kotlinVersion = '1.6.21' + ktlintVersion = '0.38.1' + ktxVersion = '1.0.2' + lifecycleVersion = '2.2.0' + materialVersion = '1.2.0' + navigationVersion = '2.3.3' + okhttpLoggingVersion = '4.7.2' + pagingVersion = '3.0.0-alpha02' + recyclerViewVersion = '1.2.0-alpha04' + retrofitVersion = '2.9.0' + roomVersion = '2.2.5' + runnerVersion = '1.0.1' + truthVersion = '0.42' + testExtJunit = '1.1.0' + uiAutomatorVersion = '2.2.0' + viewPagerVersion = '1.0.0' + workVersion = '2.1.0' + } + + repositories { + google() + mavenCentral() + } + + dependencies { + classpath "com.android.tools.build:gradle:$gradleVersion" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" + classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion" + classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion" + classpath "org.fosslight:android-dependency-scanning:1.0.0" + } +} + +plugins { + id "com.diffplug.spotless" version "5.2.0" +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +spotless { + kotlin { + target "**/*.kt" + ktlint(ktlintVersion).userData(['max_line_length' : '100']) + } +} diff --git a/tests/test_android2/sunflower/gradle.properties b/tests/test_android2/sunflower/gradle.properties new file mode 100644 index 00000000..c8e98a25 --- /dev/null +++ b/tests/test_android2/sunflower/gradle.properties @@ -0,0 +1,35 @@ +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +android.enableJetifier=true +android.useAndroidX=true +org.gradle.jvmargs=-Xmx1536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true diff --git a/tests/test_android2/sunflower/gradle/wrapper/gradle-wrapper.jar b/tests/test_android2/sunflower/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..87b738cb Binary files /dev/null and b/tests/test_android2/sunflower/gradle/wrapper/gradle-wrapper.jar differ diff --git a/tests/test_android2/sunflower/gradle/wrapper/gradle-wrapper.properties b/tests/test_android2/sunflower/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..42adf67a --- /dev/null +++ b/tests/test_android2/sunflower/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Oct 13 20:23:10 PDT 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip diff --git a/tests/test_android2/sunflower/gradlew b/tests/test_android2/sunflower/gradlew new file mode 100644 index 00000000..af6708ff --- /dev/null +++ b/tests/test_android2/sunflower/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/tests/test_android2/sunflower/gradlew.bat b/tests/test_android2/sunflower/gradlew.bat new file mode 100644 index 00000000..0f8d5937 --- /dev/null +++ b/tests/test_android2/sunflower/gradlew.bat @@ -0,0 +1,84 @@ +@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=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@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" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +: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 %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="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! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/tests/test_android2/sunflower/settings.gradle b/tests/test_android2/sunflower/settings.gradle new file mode 100644 index 00000000..1ebe8029 --- /dev/null +++ b/tests/test_android2/sunflower/settings.gradle @@ -0,0 +1,17 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +include ':app' diff --git a/tests/test_kotlin/sunflower/app/android_dependency_output.txt b/tests/test_kotlin/sunflower/app/android_dependency_output.txt new file mode 100644 index 00000000..4c7b112e --- /dev/null +++ b/tests/test_kotlin/sunflower/app/android_dependency_output.txt @@ -0,0 +1,151 @@ +"ID" Source Name or Path OSS Name OSS Version License Download Location Homepage Copyright Text License Text Exclude Comment +- [Name of the Source File or Path] [Name of the OSS used in the Source Code] [Version Number of the OSS] [License of the OSS. Use SPDX Identifier : https://spdx.org/licenses/] [Download URL or a specific location within a VCS for the OSS] [Web site that serves as the OSS's home page] [The copyright holders of the OSS] [License Text of the License. This field can be skipped if the License is in SPDX.] [If this OSS is not included in the final version, Exclude] +1 build.gradle androidx.paging:paging-compose-android 3.3.0-rc01 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.paging/paging-compose-android/3.3.0-rc01 https://developer.android.com/jetpack/androidx/releases/paging#3.3.0-rc01 http://www.apache.org/licenses/LICENSE-2.0.txt +2 build.gradle androidx.compose.ui:ui-unit-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-unit-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +3 build.gradle androidx.compose.material:material-icons-core-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.material/material-icons-core-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +4 build.gradle androidx.cardview:cardview 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.cardview/cardview/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +5 build.gradle androidx.navigation:navigation-runtime 2.7.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.navigation/navigation-runtime/2.7.7 https://developer.android.com/jetpack/androidx/releases/navigation#2.7.7 http://www.apache.org/licenses/LICENSE-2.0.txt +6 build.gradle com.github.bumptech.glide:annotations 5.0.0-rc01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/annotations/5.0.0-rc01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +7 build.gradle androidx.compose.runtime:runtime-livedata 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.runtime/runtime-livedata/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +8 build.gradle androidx.lifecycle:lifecycle-runtime-compose 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-runtime-compose/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +9 build.gradle com.squareup.okhttp3:okhttp 4.12.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/4.12.0 https://square.github.io/okhttp/ http://www.apache.org/licenses/LICENSE-2.0.txt +10 build.gradle com.github.bumptech.glide:ktx 1.0.0-beta01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/ktx/1.0.0-beta01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +11 build.gradle com.squareup.retrofit2:retrofit 2.11.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit/2.11.0 https://github.com/square/retrofit https://www.apache.org/licenses/LICENSE-2.0.txt +12 build.gradle androidx.fragment:fragment 1.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.fragment/fragment/1.6.1 https://developer.android.com/jetpack/androidx/releases/fragment#1.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +13 build.gradle androidx.compose.runtime:runtime-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.runtime/runtime-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +14 build.gradle com.squareup.retrofit2:converter-gson 2.11.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.squareup.retrofit2/converter-gson/2.11.0 https://github.com/square/retrofit https://www.apache.org/licenses/LICENSE-2.0.txt +15 build.gradle com.google.dagger:hilt-android 2.51.1 Apache 2.0 https://mvnrepository.com/artifact/com.google.dagger/hilt-android/2.51.1 https://github.com/google/dagger https://www.apache.org/licenses/LICENSE-2.0.txt +16 build.gradle androidx.compose.ui:ui-viewbinding 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-viewbinding/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +17 build.gradle androidx.versionedparcelable:versionedparcelable 1.1.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.versionedparcelable/versionedparcelable/1.1.1 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +18 build.gradle androidx.room:room-ktx 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.room/room-ktx/2.6.1 https://developer.android.com/jetpack/androidx/releases/room#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +19 build.gradle androidx.databinding:databinding-common 8.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-common/8.4.0 http://tools.android.com/ http://www.apache.org/licenses/LICENSE-2.0.txt +20 build.gradle androidx.appcompat:appcompat 1.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.appcompat/appcompat/1.6.1 https://developer.android.com/jetpack/androidx/releases/appcompat#1.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +21 build.gradle androidx.savedstate:savedstate-ktx 1.2.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.savedstate/savedstate-ktx/1.2.1 https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1 http://www.apache.org/licenses/LICENSE-2.0.txt +22 build.gradle androidx.lifecycle:lifecycle-runtime-ktx 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-runtime-ktx/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +23 build.gradle androidx.paging:paging-common-jvm 3.3.0-rc01 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.paging/paging-common-jvm/3.3.0-rc01 https://developer.android.com/jetpack/androidx/releases/paging#3.3.0-rc01 http://www.apache.org/licenses/LICENSE-2.0.txt +24 build.gradle androidx.collection:collection 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.collection/collection/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +25 build.gradle androidx.startup:startup-runtime 1.1.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.startup/startup-runtime/1.1.1 https://developer.android.com/jetpack/androidx/releases/startup#1.1.1 http://www.apache.org/licenses/LICENSE-2.0.txt +26 build.gradle androidx.constraintlayout:constraintlayout-compose 1.0.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout-compose/1.0.1 http://tools.android.com http://www.apache.org/licenses/LICENSE-2.0.txt +27 build.gradle androidx.lifecycle:lifecycle-runtime 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-runtime/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +28 build.gradle androidx.lifecycle:lifecycle-livedata-core-ktx 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata-core-ktx/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +29 build.gradle androidx.interpolator:interpolator 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.interpolator/interpolator/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +30 build.gradle androidx.databinding:databinding-ktx 8.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-ktx/8.4.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-ktx http://www.apache.org/licenses/LICENSE-2.0.txt +31 build.gradle androidx.concurrent:concurrent-futures 1.1.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.concurrent/concurrent-futures/1.1.0 https://developer.android.com/topic/libraries/architecture/index.html http://www.apache.org/licenses/LICENSE-2.0.txt +32 build.gradle androidx.activity:activity 1.9.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.activity/activity/1.9.0 https://developer.android.com/jetpack/androidx/releases/activity#1.9.0 http://www.apache.org/licenses/LICENSE-2.0.txt +33 build.gradle com.google.accompanist:accompanist-systemuicontroller 0.34.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.google.accompanist/accompanist-systemuicontroller/0.34.0 https://github.com/google/accompanist/ http://www.apache.org/licenses/LICENSE-2.0.txt +34 build.gradle androidx.collection:collection-ktx 1.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.collection/collection-ktx/1.4.0 https://developer.android.com/jetpack/androidx/releases/collection#1.4.0 http://www.apache.org/licenses/LICENSE-2.0.txt +35 build.gradle com.google.guava:listenablefuture 1.0 https://mvnrepository.com/artifact/com.google.guava/listenablefuture/1.0 https://mvnrepository.com/artifact/com.google.guava/listenablefuture +36 build.gradle com.google.dagger:hilt-core 2.51.1 Apache 2.0 https://mvnrepository.com/artifact/com.google.dagger/hilt-core/2.51.1 https://github.com/google/dagger https://www.apache.org/licenses/LICENSE-2.0.txt +37 build.gradle androidx.compose.foundation:foundation-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.foundation/foundation-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +38 build.gradle androidx.compose.animation:animation-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.animation/animation-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-animation#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +39 build.gradle com.google.code.findbugs:jsr305 3.0.2 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305/3.0.2 http://findbugs.sourceforge.net/ http://www.apache.org/licenses/LICENSE-2.0.txt +40 build.gradle androidx.activity:activity-ktx 1.9.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.activity/activity-ktx/1.9.0 https://developer.android.com/jetpack/androidx/releases/activity#1.9.0 http://www.apache.org/licenses/LICENSE-2.0.txt +41 build.gradle androidx.work:work-runtime-ktx 2.9.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.work/work-runtime-ktx/2.9.0 https://developer.android.com/jetpack/androidx/releases/work#2.9.0 http://www.apache.org/licenses/LICENSE-2.0.txt +42 build.gradle androidx.legacy:legacy-support-core-utils 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.legacy/legacy-support-core-utils/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +43 build.gradle com.github.bumptech.glide:compose 1.0.0-beta01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/compose/1.0.0-beta01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +44 build.gradle com.github.bumptech.glide:gifdecoder 5.0.0-rc01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/gifdecoder/5.0.0-rc01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +45 build.gradle androidx.navigation:navigation-compose 2.7.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.navigation/navigation-compose/2.7.7 https://developer.android.com/jetpack/androidx/releases/navigation#2.7.7 http://www.apache.org/licenses/LICENSE-2.0.txt +46 build.gradle androidx.customview:customview 1.1.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.customview/customview/1.1.0 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +47 build.gradle androidx.emoji2:emoji2-views-helper 1.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.emoji2/emoji2-views-helper/1.2.0 https://developer.android.com/jetpack/androidx/releases/emoji2#1.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +48 build.gradle androidx.compose.foundation:foundation-layout-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.foundation/foundation-layout-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +49 build.gradle androidx.fragment:fragment-ktx 1.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.fragment/fragment-ktx/1.6.1 https://developer.android.com/jetpack/androidx/releases/fragment#1.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +50 build.gradle androidx.annotation:annotation-experimental 1.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.annotation/annotation-experimental/1.4.0 https://developer.android.com/jetpack/androidx/releases/annotation#1.4.0 http://www.apache.org/licenses/LICENSE-2.0.txt +51 build.gradle androidx.arch.core:core-common 2.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.arch.core/core-common/2.2.0 https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +52 build.gradle androidx.lifecycle:lifecycle-common 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-common/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +53 build.gradle androidx.sqlite:sqlite-framework 2.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.sqlite/sqlite-framework/2.4.0 https://developer.android.com/jetpack/androidx/releases/sqlite#2.4.0 http://www.apache.org/licenses/LICENSE-2.0.txt +54 build.gradle javax.inject:javax.inject 1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/javax.inject/javax.inject/1 http://code.google.com/p/atinject/ http://www.apache.org/licenses/LICENSE-2.0.txt +55 build.gradle org.jetbrains:annotations 23.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains/annotations/23.0.0 https://github.com/JetBrains/java-annotations https://www.apache.org/licenses/LICENSE-2.0.txt +56 build.gradle androidx.navigation:navigation-runtime-ktx 2.7.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.navigation/navigation-runtime-ktx/2.7.7 https://developer.android.com/jetpack/androidx/releases/navigation#2.7.7 http://www.apache.org/licenses/LICENSE-2.0.txt +57 build.gradle androidx.lifecycle:lifecycle-viewmodel 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +58 build.gradle org.jetbrains.kotlinx:kotlinx-coroutines-swing 1.8.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-swing/1.8.0 https://github.com/Kotlin/kotlinx.coroutines https://www.apache.org/licenses/LICENSE-2.0.txt +59 build.gradle org.jetbrains.kotlinx:kotlinx-coroutines-android 1.6.4 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.6.4 https://github.com/Kotlin/kotlinx.coroutines https://www.apache.org/licenses/LICENSE-2.0.txt +60 build.gradle com.github.bumptech.glide:glide 5.0.0-rc01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/glide/5.0.0-rc01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +61 build.gradle androidx.core:core-ktx 1.13.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.core/core-ktx/1.13.1 https://developer.android.com/jetpack/androidx/releases/core#1.13.1 http://www.apache.org/licenses/LICENSE-2.0.txt +62 build.gradle androidx.loader:loader 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.loader/loader/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +63 build.gradle androidx.appcompat:appcompat-resources 1.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.appcompat/appcompat-resources/1.6.1 https://developer.android.com/jetpack/androidx/releases/appcompat#1.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +64 build.gradle androidx.lifecycle:lifecycle-runtime-ktx 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-runtime-ktx/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +65 build.gradle androidx.compose.ui:ui-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +66 build.gradle androidx.constraintlayout:constraintlayout 2.0.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout/2.0.1 http://tools.android.com http://www.apache.org/licenses/LICENSE-2.0.txt +67 build.gradle androidx.compose.ui:ui-graphics-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-graphics-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +68 build.gradle com.google.dagger:dagger 2.51.1 Apache 2.0 https://mvnrepository.com/artifact/com.google.dagger/dagger/2.51.1 https://github.com/google/dagger https://www.apache.org/licenses/LICENSE-2.0.txt +69 build.gradle com.google.dagger:dagger-lint-aar 2.51.1 Apache 2.0 https://mvnrepository.com/artifact/com.google.dagger/dagger-lint-aar/2.51.1 https://github.com/google/dagger https://www.apache.org/licenses/LICENSE-2.0.txt +70 build.gradle com.google.android.material:material 1.13.0-alpha01 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.google.android.material/material/1.13.0-alpha01 https://github.com/material-components/material-components-android http://www.apache.org/licenses/LICENSE-2.0.txt +71 build.gradle androidx.viewpager:viewpager 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.viewpager/viewpager/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +72 build.gradle androidx.room:room-common 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.room/room-common/2.6.1 https://developer.android.com/jetpack/androidx/releases/room#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +73 build.gradle com.github.bumptech.glide:disklrucache 5.0.0-rc01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/disklrucache/5.0.0-rc01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +74 build.gradle androidx.lifecycle:lifecycle-service 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-service/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +75 build.gradle androidx.lifecycle:lifecycle-process 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-process/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +76 build.gradle androidx.constraintlayout:constraintlayout-solver 2.0.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout-solver/2.0.1 http://tools.android.com http://www.apache.org/licenses/LICENSE-2.0.txt +77 build.gradle androidx.sqlite:sqlite 2.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.sqlite/sqlite/2.4.0 https://developer.android.com/jetpack/androidx/releases/sqlite#2.4.0 http://www.apache.org/licenses/LICENSE-2.0.txt +78 build.gradle androidx.databinding:databinding-runtime 8.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-runtime/8.4.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-runtime http://www.apache.org/licenses/LICENSE-2.0.txt +79 build.gradle org.jetbrains.kotlin:kotlin-stdlib 1.9.20 The Apache License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib/1.9.20 https://kotlinlang.org/ http://www.apache.org/licenses/LICENSE-2.0.txt +80 build.gradle androidx.profileinstaller:profileinstaller 1.3.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.profileinstaller/profileinstaller/1.3.0 https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.3.0 http://www.apache.org/licenses/LICENSE-2.0.txt +81 build.gradle androidx.lifecycle:lifecycle-viewmodel 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +82 build.gradle androidx.databinding:viewbinding 8.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.databinding/viewbinding/8.4.0 https://mvnrepository.com/artifact/androidx.databinding/viewbinding http://www.apache.org/licenses/LICENSE-2.0.txt +83 build.gradle androidx.room:room-runtime 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.room/room-runtime/2.6.1 https://developer.android.com/jetpack/androidx/releases/room#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +84 build.gradle androidx.lifecycle:lifecycle-livedata 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +85 build.gradle androidx.hilt:hilt-navigation 1.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.hilt/hilt-navigation/1.2.0 https://developer.android.com/jetpack/androidx/releases/hilt#1.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +86 build.gradle androidx.compose.material3:material3-desktop 1.2.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.material3/material3-desktop/1.2.1 https://developer.android.com/jetpack/androidx/releases/compose-material3#1.2.1 http://www.apache.org/licenses/LICENSE-2.0.txt +87 build.gradle androidx.recyclerview:recyclerview 1.1.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview/1.1.0 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +88 build.gradle androidx.compose.ui:ui-util-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-util-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +89 build.gradle androidx.compose.animation:animation-core-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.animation/animation-core-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-animation#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +90 build.gradle androidx.localbroadcastmanager:localbroadcastmanager 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.localbroadcastmanager/localbroadcastmanager/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +91 build.gradle androidx.drawerlayout:drawerlayout 1.1.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.drawerlayout/drawerlayout/1.1.1 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +92 build.gradle androidx.compose.ui:ui-tooling-preview-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-tooling-preview-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +93 build.gradle org.jetbrains.kotlin:kotlin-stdlib 2.0.0 The Apache License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib/2.0.0 https://kotlinlang.org/ http://www.apache.org/licenses/LICENSE-2.0.txt +94 build.gradle org.jetbrains:annotations 13.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains/annotations/13.0 http://www.jetbrains.org http://www.apache.org/licenses/LICENSE-2.0.txt +95 build.gradle com.squareup.okio:okio-jvm 3.6.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.squareup.okio/okio-jvm/3.6.0 https://github.com/square/okio/ http://www.apache.org/licenses/LICENSE-2.0.txt +96 build.gradle androidx.compose.material:material-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.material/material-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +97 build.gradle com.google.errorprone:error_prone_annotations 2.15.0 Apache 2.0 https://mvnrepository.com/artifact/com.google.errorprone/error_prone_annotations/2.15.0 https://mvnrepository.com/artifact/com.google.errorprone/error_prone_annotations http://www.apache.org/licenses/LICENSE-2.0.txt +98 build.gradle org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm 1.8.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.8.0 https://github.com/Kotlin/kotlinx.coroutines https://www.apache.org/licenses/LICENSE-2.0.txt +99 build.gradle org.jetbrains.kotlinx:kotlinx-coroutines-android 1.8.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.8.0 https://github.com/Kotlin/kotlinx.coroutines https://www.apache.org/licenses/LICENSE-2.0.txt +100 build.gradle androidx.lifecycle:lifecycle-process 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-process/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +101 build.gradle androidx.print:print 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.print/print/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +102 build.gradle androidx.annotation:annotation-jvm 1.8.0-rc01 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.annotation/annotation-jvm/1.8.0-rc01 https://developer.android.com/jetpack/androidx/releases/annotation#1.8.0-rc01 http://www.apache.org/licenses/LICENSE-2.0.txt +103 build.gradle androidx.constraintlayout:constraintlayout-core 1.0.4 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout-core/1.0.4 http://tools.android.com http://www.apache.org/licenses/LICENSE-2.0.txt +104 build.gradle androidx.compose.material:material-ripple-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.material/material-ripple-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +105 build.gradle androidx.savedstate:savedstate 1.2.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.savedstate/savedstate/1.2.1 https://developer.android.com/jetpack/androidx/releases/savedstate#1.2.1 http://www.apache.org/licenses/LICENSE-2.0.txt +106 build.gradle androidx.compose.ui:ui-geometry-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-geometry-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +107 build.gradle androidx.exifinterface:exifinterface 1.3.6 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.exifinterface/exifinterface/1.3.6 https://developer.android.com/jetpack/androidx/releases/exifinterface#1.3.6 http://www.apache.org/licenses/LICENSE-2.0.txt +108 build.gradle androidx.lifecycle:lifecycle-service 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-service/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +109 build.gradle androidx.databinding:databinding-adapters 8.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-adapters/8.4.0 https://mvnrepository.com/artifact/androidx.databinding/databinding-adapters http://www.apache.org/licenses/LICENSE-2.0.txt +110 build.gradle androidx.resourceinspection:resourceinspection-annotation 1.0.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.resourceinspection/resourceinspection-annotation/1.0.1 https://developer.android.com/jetpack/androidx/releases/resourceinspection#1.0.1 http://www.apache.org/licenses/LICENSE-2.0.txt +111 build.gradle androidx.hilt:hilt-navigation-compose 1.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.hilt/hilt-navigation-compose/1.2.0 https://developer.android.com/jetpack/androidx/releases/hilt#1.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +112 build.gradle androidx.collection:collection-jvm 1.4.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.collection/collection-jvm/1.4.0 https://developer.android.com/jetpack/androidx/releases/collection#1.4.0 http://www.apache.org/licenses/LICENSE-2.0.txt +113 build.gradle com.github.bumptech.glide:recyclerview-integration 5.0.0-rc01 Simplified BSD License https://mvnrepository.com/artifact/com.github.bumptech.glide/recyclerview-integration/5.0.0-rc01 https://github.com/bumptech/glide http://www.opensource.org/licenses/bsd-license +114 build.gradle androidx.lifecycle:lifecycle-common-java8 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-common-java8/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +115 build.gradle androidx.core:core 1.13.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.core/core/1.13.1 https://developer.android.com/jetpack/androidx/releases/core#1.13.1 http://www.apache.org/licenses/LICENSE-2.0.txt +116 build.gradle androidx.lifecycle:lifecycle-livedata-core 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata-core/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +117 build.gradle androidx.lifecycle:lifecycle-viewmodel-compose 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel-compose/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +118 build.gradle androidx.lifecycle:lifecycle-livedata-core 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata-core/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +119 build.gradle org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.20 The Apache License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.9.20 https://kotlinlang.org/ http://www.apache.org/licenses/LICENSE-2.0.txt +120 build.gradle androidx.lifecycle:lifecycle-viewmodel-savedstate 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel-savedstate/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +121 build.gradle androidx.vectordrawable:vectordrawable-animated 1.1.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.vectordrawable/vectordrawable-animated/1.1.0 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +122 build.gradle com.squareup.okhttp3:logging-interceptor 4.12.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor/4.12.0 https://square.github.io/okhttp/ http://www.apache.org/licenses/LICENSE-2.0.txt +123 build.gradle androidx.lifecycle:lifecycle-livedata-ktx 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata-ktx/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +124 build.gradle androidx.arch.core:core-runtime 2.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.arch.core/core-runtime/2.2.0 https://developer.android.com/jetpack/androidx/releases/arch-core#2.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +125 build.gradle androidx.navigation:navigation-common-ktx 2.7.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.navigation/navigation-common-ktx/2.7.7 https://developer.android.com/jetpack/androidx/releases/navigation#2.7.7 http://www.apache.org/licenses/LICENSE-2.0.txt +126 build.gradle androidx.profileinstaller:profileinstaller 1.3.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.profileinstaller/profileinstaller/1.3.1 https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.3.1 http://www.apache.org/licenses/LICENSE-2.0.txt +127 build.gradle androidx.lifecycle:lifecycle-common 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-common/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +128 build.gradle org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm 1.6.4 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.6.4 https://github.com/Kotlin/kotlinx.coroutines https://www.apache.org/licenses/LICENSE-2.0.txt +129 build.gradle androidx.cursoradapter:cursoradapter 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.cursoradapter/cursoradapter/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +130 build.gradle androidx.transition:transition 1.5.0-rc01 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.transition/transition/1.5.0-rc01 https://developer.android.com/jetpack/androidx/releases/transition#1.5.0-rc01 http://www.apache.org/licenses/LICENSE-2.0.txt +131 build.gradle androidx.dynamicanimation:dynamicanimation 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.dynamicanimation/dynamicanimation/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +132 build.gradle com.google.code.gson:gson 2.10.1 Apache-2.0 https://mvnrepository.com/artifact/com.google.code.gson/gson/2.10.1 https://mvnrepository.com/artifact/com.google.code.gson/gson https://www.apache.org/licenses/LICENSE-2.0.txt +133 build.gradle androidx.lifecycle:lifecycle-viewmodel-ktx 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel-ktx/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt +134 build.gradle androidx.tracing:tracing 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.tracing/tracing/1.0.0 https://developer.android.com/jetpack/androidx/releases/tracing#1.0.0 http://www.apache.org/licenses/LICENSE-2.0.txt +135 build.gradle androidx.lifecycle:lifecycle-livedata 2.6.1 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata/2.6.1 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.1 http://www.apache.org/licenses/LICENSE-2.0.txt +136 build.gradle androidx.coordinatorlayout:coordinatorlayout 1.1.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.coordinatorlayout/coordinatorlayout/1.1.0 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +137 build.gradle androidx.navigation:navigation-common 2.7.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.navigation/navigation-common/2.7.7 https://developer.android.com/jetpack/androidx/releases/navigation#2.7.7 http://www.apache.org/licenses/LICENSE-2.0.txt +138 build.gradle androidx.vectordrawable:vectordrawable 1.1.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.vectordrawable/vectordrawable/1.1.0 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +139 build.gradle androidx.annotation:annotation 1.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.annotation/annotation/1.2.0 https://developer.android.com/jetpack/androidx/releases/annotation#1.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +140 build.gradle androidx.work:work-runtime 2.9.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.work/work-runtime/2.9.0 https://developer.android.com/jetpack/androidx/releases/work#2.9.0 http://www.apache.org/licenses/LICENSE-2.0.txt +141 build.gradle org.jetbrains.kotlin:kotlin-stdlib-jdk7 1.9.20 The Apache License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.9.20 https://kotlinlang.org/ http://www.apache.org/licenses/LICENSE-2.0.txt +142 build.gradle androidx.compose.ui:ui-text-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.ui/ui-text-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +143 build.gradle androidx.compose.runtime:runtime-saveable-desktop 1.6.7 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.compose.runtime/runtime-saveable-desktop/1.6.7 https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.6.7 http://www.apache.org/licenses/LICENSE-2.0.txt +144 build.gradle androidx.emoji2:emoji2 1.2.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.emoji2/emoji2/1.2.0 https://developer.android.com/jetpack/androidx/releases/emoji2#1.2.0 http://www.apache.org/licenses/LICENSE-2.0.txt +145 build.gradle androidx.activity:activity-compose 1.9.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.activity/activity-compose/1.9.0 https://developer.android.com/jetpack/androidx/releases/activity#1.9.0 http://www.apache.org/licenses/LICENSE-2.0.txt +146 build.gradle org.jetbrains.kotlin:kotlin-stdlib 1.9.22 The Apache License Version 2.0 https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib/1.9.22 https://kotlinlang.org/ http://www.apache.org/licenses/LICENSE-2.0.txt +147 build.gradle androidx.viewpager2:viewpager2 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.viewpager2/viewpager2/1.0.0 https://developer.android.com/jetpack/androidx http://www.apache.org/licenses/LICENSE-2.0.txt +148 build.gradle androidx.documentfile:documentfile 1.0.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.documentfile/documentfile/1.0.0 http://developer.android.com/tools/extras/support-library.html http://www.apache.org/licenses/LICENSE-2.0.txt +149 build.gradle androidx.lifecycle:lifecycle-runtime 2.7.0 The Apache Software License Version 2.0 https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-runtime/2.7.0 https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0 http://www.apache.org/licenses/LICENSE-2.0.txt \ No newline at end of file diff --git a/tests/test_kotlin/sunflower/app/build.gradle.kts b/tests/test_kotlin/sunflower/app/build.gradle.kts new file mode 100644 index 00000000..4a7ac33b --- /dev/null +++ b/tests/test_kotlin/sunflower/app/build.gradle.kts @@ -0,0 +1,167 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.ksp) + alias(libs.plugins.hilt) + alias(libs.plugins.compose.compiler) +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.google.samples.apps.sunflower" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + testInstrumentationRunner = "com.google.samples.apps.sunflower.utilities.MainTestRunner" + versionCode = 1 + versionName = "0.1.6" + vectorDrawables.useSupportLibrary = true + + // Consult the README on instructions for setting up Unsplash API key + buildConfigField("String", "UNSPLASH_ACCESS_KEY", "\"" + getUnsplashAccess() + "\"") + javaCompileOptions { + annotationProcessorOptions { + arguments["dagger.hilt.disableModulesHaveInstallInCheck"] = "true" + } + } + } + buildTypes { + release { + isMinifyEnabled = true + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + create("benchmark") { + initWith(getByName("release")) + signingConfig = signingConfigs.getByName("debug") + isDebuggable = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules-benchmark.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + // work-runtime-ktx 2.1.0 and above now requires Java 8 + jvmTarget = JavaVersion.VERSION_17.toString() + + // Enable Coroutines and Flow APIs + freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" + freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlinx.coroutines.FlowPreview" + } + buildFeatures { + compose = true + dataBinding = true + buildConfig = true + } + packagingOptions { + // Multiple dependency bring these files in. Exclude them to enable + // our test APK to build (has no effect on our AARs) + resources.excludes += "/META-INF/AL2.0" + resources.excludes += "/META-INF/LGPL2.1" + } + + testOptions { + managedDevices { + devices { + maybeCreate("pixel2api27").apply { + device = "Pixel 2" + apiLevel = 27 + systemImageSource = "aosp" + } + } + } + } + namespace = "com.google.samples.apps.sunflower" +} + +androidComponents { + onVariants(selector().withBuildType("release")) { + // Only exclude *.version files in release mode as debug mode requires + // these files for layout inspector to work. + it.packaging.resources.excludes.add("META-INF/*.version") + } +} + +dependencies { + ksp(libs.androidx.room.compiler) + ksp(libs.hilt.android.compiler) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.livedata.ktx) + implementation(libs.androidx.lifecycle.viewmodel.ktx) + implementation(libs.androidx.navigation.compose) + implementation(libs.androidx.paging.compose) + implementation(libs.androidx.room.ktx) + implementation(libs.androidx.work.runtime.ktx) + implementation(libs.material) + implementation(libs.gson) + implementation(libs.okhttp3.logging.interceptor) + implementation(libs.retrofit2.converter.gson) + implementation(libs.retrofit2) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.hilt.android) + implementation(libs.hilt.navigation.compose) + implementation(libs.androidx.profileinstaller) + + // Compose + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.constraintlayout.compose) + implementation(libs.androidx.compose.runtime) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.foundation.layout) + implementation(libs.androidx.compose.material3) + implementation(libs.androidx.compose.ui.viewbinding) + implementation(libs.androidx.compose.ui.tooling.preview) + implementation(libs.androidx.compose.runtime.livedata) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.glide) + implementation(libs.accompanist.systemuicontroller) + debugImplementation(libs.androidx.compose.ui.tooling) + + // Testing dependencies + debugImplementation(libs.androidx.monitor) + kspAndroidTest(libs.hilt.android.compiler) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.arch.core.testing) + androidTestImplementation(libs.androidx.espresso.contrib) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(libs.androidx.espresso.intents) + androidTestImplementation(libs.androidx.test.ext.junit) + androidTestImplementation(libs.androidx.test.uiautomator) + androidTestImplementation(libs.androidx.work.testing) + androidTestImplementation(libs.androidx.compose.ui.test.junit4) + androidTestImplementation(libs.guava) + androidTestImplementation(libs.hilt.android.testing) + androidTestImplementation(libs.accessibility.test.framework) + androidTestImplementation(libs.kotlinx.coroutines.test) + testImplementation(libs.junit) +} + +fun getUnsplashAccess(): String? { + return project.findProperty("unsplash_access_key") as? String +} diff --git a/tests/test_kotlin/sunflower/build.gradle.kts b/tests/test_kotlin/sunflower/build.gradle.kts new file mode 100644 index 00000000..afc7e410 --- /dev/null +++ b/tests/test_kotlin/sunflower/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +buildscript { + repositories { + google() + mavenCentral() + } +} + +plugins { + alias(libs.plugins.android.application) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.hilt) apply false + alias(libs.plugins.spotless) + alias(libs.plugins.ksp) apply false + alias(libs.plugins.android.test) apply false + alias(libs.plugins.gradle.versions) + alias(libs.plugins.version.catalog.update) + alias(libs.plugins.compose.compiler) +} \ No newline at end of file diff --git a/tests/test_kotlin2/sunflower/app/build.gradle.kts b/tests/test_kotlin2/sunflower/app/build.gradle.kts new file mode 100644 index 00000000..4a7ac33b --- /dev/null +++ b/tests/test_kotlin2/sunflower/app/build.gradle.kts @@ -0,0 +1,167 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.ksp) + alias(libs.plugins.hilt) + alias(libs.plugins.compose.compiler) +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.google.samples.apps.sunflower" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + testInstrumentationRunner = "com.google.samples.apps.sunflower.utilities.MainTestRunner" + versionCode = 1 + versionName = "0.1.6" + vectorDrawables.useSupportLibrary = true + + // Consult the README on instructions for setting up Unsplash API key + buildConfigField("String", "UNSPLASH_ACCESS_KEY", "\"" + getUnsplashAccess() + "\"") + javaCompileOptions { + annotationProcessorOptions { + arguments["dagger.hilt.disableModulesHaveInstallInCheck"] = "true" + } + } + } + buildTypes { + release { + isMinifyEnabled = true + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + create("benchmark") { + initWith(getByName("release")) + signingConfig = signingConfigs.getByName("debug") + isDebuggable = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules-benchmark.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + // work-runtime-ktx 2.1.0 and above now requires Java 8 + jvmTarget = JavaVersion.VERSION_17.toString() + + // Enable Coroutines and Flow APIs + freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" + freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlinx.coroutines.FlowPreview" + } + buildFeatures { + compose = true + dataBinding = true + buildConfig = true + } + packagingOptions { + // Multiple dependency bring these files in. Exclude them to enable + // our test APK to build (has no effect on our AARs) + resources.excludes += "/META-INF/AL2.0" + resources.excludes += "/META-INF/LGPL2.1" + } + + testOptions { + managedDevices { + devices { + maybeCreate("pixel2api27").apply { + device = "Pixel 2" + apiLevel = 27 + systemImageSource = "aosp" + } + } + } + } + namespace = "com.google.samples.apps.sunflower" +} + +androidComponents { + onVariants(selector().withBuildType("release")) { + // Only exclude *.version files in release mode as debug mode requires + // these files for layout inspector to work. + it.packaging.resources.excludes.add("META-INF/*.version") + } +} + +dependencies { + ksp(libs.androidx.room.compiler) + ksp(libs.hilt.android.compiler) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.livedata.ktx) + implementation(libs.androidx.lifecycle.viewmodel.ktx) + implementation(libs.androidx.navigation.compose) + implementation(libs.androidx.paging.compose) + implementation(libs.androidx.room.ktx) + implementation(libs.androidx.work.runtime.ktx) + implementation(libs.material) + implementation(libs.gson) + implementation(libs.okhttp3.logging.interceptor) + implementation(libs.retrofit2.converter.gson) + implementation(libs.retrofit2) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.hilt.android) + implementation(libs.hilt.navigation.compose) + implementation(libs.androidx.profileinstaller) + + // Compose + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.constraintlayout.compose) + implementation(libs.androidx.compose.runtime) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.foundation.layout) + implementation(libs.androidx.compose.material3) + implementation(libs.androidx.compose.ui.viewbinding) + implementation(libs.androidx.compose.ui.tooling.preview) + implementation(libs.androidx.compose.runtime.livedata) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.glide) + implementation(libs.accompanist.systemuicontroller) + debugImplementation(libs.androidx.compose.ui.tooling) + + // Testing dependencies + debugImplementation(libs.androidx.monitor) + kspAndroidTest(libs.hilt.android.compiler) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.arch.core.testing) + androidTestImplementation(libs.androidx.espresso.contrib) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(libs.androidx.espresso.intents) + androidTestImplementation(libs.androidx.test.ext.junit) + androidTestImplementation(libs.androidx.test.uiautomator) + androidTestImplementation(libs.androidx.work.testing) + androidTestImplementation(libs.androidx.compose.ui.test.junit4) + androidTestImplementation(libs.guava) + androidTestImplementation(libs.hilt.android.testing) + androidTestImplementation(libs.accessibility.test.framework) + androidTestImplementation(libs.kotlinx.coroutines.test) + testImplementation(libs.junit) +} + +fun getUnsplashAccess(): String? { + return project.findProperty("unsplash_access_key") as? String +} diff --git a/tests/test_kotlin2/sunflower/build.gradle.kts b/tests/test_kotlin2/sunflower/build.gradle.kts new file mode 100644 index 00000000..afc7e410 --- /dev/null +++ b/tests/test_kotlin2/sunflower/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +buildscript { + repositories { + google() + mavenCentral() + } +} + +plugins { + alias(libs.plugins.android.application) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.hilt) apply false + alias(libs.plugins.spotless) + alias(libs.plugins.ksp) apply false + alias(libs.plugins.android.test) apply false + alias(libs.plugins.gradle.versions) + alias(libs.plugins.version.catalog.update) + alias(libs.plugins.compose.compiler) +} \ No newline at end of file diff --git a/tests/test_kotlin2/sunflower/gradle.properties b/tests/test_kotlin2/sunflower/gradle.properties new file mode 100644 index 00000000..3fb4363d --- /dev/null +++ b/tests/test_kotlin2/sunflower/gradle.properties @@ -0,0 +1,33 @@ +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +android.useAndroidX=true +org.gradle.jvmargs=-Xmx1536m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true diff --git a/tests/test_kotlin2/sunflower/gradle/libs.versions.toml b/tests/test_kotlin2/sunflower/gradle/libs.versions.toml new file mode 100644 index 00000000..a758a68b --- /dev/null +++ b/tests/test_kotlin2/sunflower/gradle/libs.versions.toml @@ -0,0 +1,127 @@ +## +## Copyright 2024 Google LLC +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## https://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +[versions] +accessibilityTestFramework = "4.1.1" +activityCompose = "1.9.0" +androidGradlePlugin = "8.4.0" +benchmark = "1.2.4" +# @keep +compileSdk = "34" +# @keep +compose-compiler = "1.5.13" +composeBom = "2024.05.00" +composeLatest = "1.7.0-alpha01" +constraintLayoutCompose = "1.0.1" +coreTesting = "2.2.0" +coroutines = "1.8.0" +espresso = "3.5.1" +glide = "1.0.0-beta01" +gradle = "7.2.0" +gradle-versions = "0.51.0" +gson = "2.10.1" +guava = "33.1.0-jre" +hilt = "2.51.1" +hiltNavigationCompose = "1.2.0" +junit = "4.13.2" +kotlin = "2.0.0" +ksp = "2.0.0-1.0.21" +# @keep +ktlint = "0.40.0" +ktx = "1.13.1" +lifecycle = "2.7.0" +material = "1.13.0-alpha01" +material3 = "1.2.1" +# @keep +minSdk = "24" +monitor = "1.6.1" +navigation = "2.7.7" +okhttpLogging = "4.12.0" +pagingCompose = "3.3.0-rc01" +profileInstaller = "1.3.1" +retrofit = "2.11.0" +room = "2.6.1" +spotless = "6.25.0" +systemuicontroller = "0.34.0" +# @keep +targetSdk = "34" +testExtJunit = "1.1.5" +uiAutomator = "2.3.0" +version-catalog-update = "0.8.4" +viewModelCompose = "2.7.0" +work = "2.9.0" + +[libraries] +accessibility-test-framework = { module = "com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework", version.ref = "accessibilityTestFramework" } +accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "systemuicontroller" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } +androidx-arch-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" } +androidx-benchmark-macro-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "benchmark" } +androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" } +androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" } +androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout" } +androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" } +androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" } +androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" } +androidx-compose-ui = { module = "androidx.compose.ui:ui" } +androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } +androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } +androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } +androidx-compose-ui-viewbinding = { module = "androidx.compose.ui:ui-viewbinding" } +androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "constraintLayoutCompose" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "ktx" } +androidx-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" } +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } +androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espresso" } +androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" } +androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "viewModelCompose" } +androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "viewModelCompose" } +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" } +androidx-monitor = { module = "androidx.test:monitor", version.ref = "monitor" } +androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" } +androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "pagingCompose" } +androidx-profileinstaller = { module = "androidx.profileinstaller:profileinstaller", version.ref = "profileInstaller" } +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } +androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" } +androidx-test-ext-junit = { module = "androidx.test.ext:junit", version.ref = "testExtJunit" } +androidx-test-uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator" } +androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "work" } +androidx-work-testing = { module = "androidx.work:work-testing", version.ref = "work" } +glide = { module = "com.github.bumptech.glide:compose", version.ref = "glide" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +guava = { module = "com.google.guava:guava", version.ref = "guava" } +hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } +hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" } +hilt-android-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" } +hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationCompose" } +junit = { module = "junit:junit", version.ref = "junit" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } +material = { module = "com.google.android.material:material", version.ref = "material" } +okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttpLogging" } +retrofit2 = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } +retrofit2-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } +android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" } +gradle-versions = { id = "com.github.ben-manes.versions", version.ref = "gradle-versions" } +hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } +version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "version-catalog-update" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/tests/test_kotlin2/sunflower/gradle/wrapper/gradle-wrapper.jar b/tests/test_kotlin2/sunflower/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..87b738cb Binary files /dev/null and b/tests/test_kotlin2/sunflower/gradle/wrapper/gradle-wrapper.jar differ diff --git a/tests/test_kotlin2/sunflower/gradle/wrapper/gradle-wrapper.properties b/tests/test_kotlin2/sunflower/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..f982653b --- /dev/null +++ b/tests/test_kotlin2/sunflower/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Jan 03 11:14:53 PST 2024 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/tests/test_kotlin2/sunflower/gradlew b/tests/test_kotlin2/sunflower/gradlew new file mode 100644 index 00000000..af6708ff --- /dev/null +++ b/tests/test_kotlin2/sunflower/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/tests/test_kotlin2/sunflower/gradlew.bat b/tests/test_kotlin2/sunflower/gradlew.bat new file mode 100644 index 00000000..0f8d5937 --- /dev/null +++ b/tests/test_kotlin2/sunflower/gradlew.bat @@ -0,0 +1,84 @@ +@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=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@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" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +: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 %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="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! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/tests/test_kotlin2/sunflower/settings.gradle.kts b/tests/test_kotlin2/sunflower/settings.gradle.kts new file mode 100644 index 00000000..64d3450f --- /dev/null +++ b/tests/test_kotlin2/sunflower/settings.gradle.kts @@ -0,0 +1,33 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +include(":app")