Automatically indexes classes from Gradle-cached AAR/JAR dependencies and provides
instant API lookups. Zero external dependencies — pure Python standard library.
Always check import statements first — the same simple class name may exist in multiple libraries:
import statements at the top of the file for the FQCN (e.g., com.example.StringUtils)The tool needs the Android module path (directory containing build.gradle or build.gradle.kts).
Script location: scripts/lookup_class.py (relative to this skill directory)
Lookup by class name (most common):
python3 <SKILL_DIR>/scripts/lookup_class.py -p <MODULE_PATH> -c <class_name>
Examples:
# Precise lookup with FQCN (recommended)
python3 scripts/lookup_class.py -p /path/to/module -c com.example.StringUtils
# Simple name lookup (returns all matches)
python3 scripts/lookup_class.py -p /path/to/module -c StringUtils
# Show full source code instead of API summary
python3 scripts/lookup_class.py -p /path/to/module -c StringUtils --source
Other queries:
# List all classes in a package
python3 scripts/lookup_class.py -p <MODULE_PATH> --package com.example.util
# List all classes in a library
python3 scripts/lookup_class.py -p <MODULE_PATH> --library com.example:utils
# Fuzzy search
python3 scripts/lookup_class.py -p <MODULE_PATH> --search Toast
# Index statistics
python3 scripts/lookup_class.py -p <MODULE_PATH> --stats
Results are JSON with: class (FQCN), library (Maven coordinate), version, and api_summary (public method signatures with Javadoc when sources.jar is available).
build.gradle) and Kotlin DSL (build.gradle.kts)When writing code based on lookup results:
共 1 个版本