Imported from forestileao/EstudonautaApp (
AGENTS.md). Install upstream withnpx skills add forestileao/EstudonautaApp. Copyright stays with the author.
AGENTS.md
Guidance for agents and contributors working in this repository.
Estudonauta is a small, single-module Android app built during the Estudonauta Android Studio course. It is written in Java and serves an educational purpose: a home screen that links out to the course team, course catalog, and an embedded intro video.
Project layout
Single Gradle module named :app (see settings.gradle,
rootProject.name = "Estudonauta").
app/build.gradle— module build config (SDK versions, dependencies).build.gradle— top-level build script (Android Gradle Plugin, repositories).gradle.properties— enables AndroidX (android.useAndroidX=true) and Jetifier (android.enableJetifier=true).app/src/main/java/com/estudonauta/estudonautaapp/— application code.app/src/main/res/layout/— one XML layout per activity.app/src/main/res/— other resources:values/(strings, colors, themes),drawable-v24/,mipmap-*/, andraw/estudonauta.mp4(intro video).app/src/main/AndroidManifest.xml— declares the application and activities.app/src/test/— JUnit unit tests (run on the local JVM).app/src/androidTest/— Espresso instrumented tests (run on a device/emulator).
Key packages and activities
All application code lives in the com.estudonauta.estudonautaapp package.
Each activity extends androidx.appcompat.app.AppCompatActivity and is wired to
a layout under res/layout/ via setContentView(R.layout.activity_*):
MainActivity(activity_main) — launcher activity. Forces day/night toMODE_NIGHT_NOand providesclickTeam,clickCourses, andclickMediahandlers that start the other activities viaIntent.Team(activity_team) — shows the course team;clickBackcallsfinish().Courses(activity_courses) — links out to course pages on estudonauta.com usingIntent.ACTION_VIEW.Media(activity_media) — playsres/raw/estudonauta.mp4in aVideoView.
View click handlers are bound in XML via android:onClick (methods take a
single View argument), rather than in code.
Build
Use the bundled Gradle wrapper (./gradlew, or gradlew.bat on Windows). Do
not require a locally installed Gradle. The wrapper pins Gradle 6.5, which needs
a Java 8–14 JDK (JAVA_HOME must point at one).
./gradlew assembleDebug— build the debug APK (app/build/outputs/apk/debug/)../gradlew build— assemble and run all local checks../gradlew clean— remove build outputs.
Test
./gradlew test— run JUnit unit tests inapp/src/test/on the local JVM. For a single variant use./gradlew testDebugUnitTest../gradlew connectedAndroidTest— run Espresso instrumented tests inapp/src/androidTest/. This requires a running emulator or a connected device (adb devicesshould list one); it will fail with no target attached.
Conventions
- SDK/Java versions:
minSdkVersion 24,targetSdkVersion 30,compileSdkVersion 30,buildToolsVersion 30.0.2; source/target compatibility Java 8 (JavaVersion.VERSION_1_8). Android Gradle Plugin 4.1.0. - AndroidX: use AndroidX/Material/ConstraintLayout artifacts (see
app/build.gradle); do not add legacyandroid.support.*dependencies. - Adding a new activity: create the
*.javaclass incom.estudonauta.estudonautaapp, add itsactivity_*.xmllayout underres/layout/, and register the activity inAndroidManifest.xml. OnlyMainActivitydeclares theLAUNCHERintent filter. - Keep resource identifiers (layouts, drawables, string keys) consistent with the existing lowercase, activity-prefixed naming already in the repo.