Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README: Add Installation and Setup Instructions #2135

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,37 @@ Maestro is built on learnings from its predecessors (Appium, Espresso, UIAutomat
- Declarative yet powerful syntax. Define your tests in a `yaml` file.
- Simple setup. Maestro is a single binary that works anywhere.

## Build and Run Instructions
Build and Package

To build and package the project, run the following commands:

./gradlew build --stacktrace

./gradlew build

./gradlew jar

The JAR file will be generated in the build/libs directory.

## Run the Application

To execute the application, run:

java -jar build/libs/maestro-0.1.0.jar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this route over the one that's in the maestro script in the root directory?

(Not saying this is wrong - I genuinely don't know which route has what tradeoffs)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it specifies including libraries and the version to run so that subsequently when there is an update the readme will be updated to which version is in vogue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But running the ./maestro script will build and run the current version of the code and not require the readme update, no?


## Run Tests

To run all tests, execute:

./gradlew test
Comment on lines +37 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weirdly, I'm not certain that this actually does run all of the tests 😂


## Publish

If you have configured publishing for this project, you can publish it with:

./gradlew publish

## Resources

### Documentation
Expand All @@ -40,4 +71,3 @@ To get started, take a look at [issues with the `good first issue` label][good f

[good first issues]: https://github.com/mobile-dev-inc/maestro/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
[blogpost]: https://blog.mobile.dev/introducing-maestro-painless-mobile-ui-automation-bee4992d13c1

52 changes: 52 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,55 @@ detekt {
autoCorrect = true
config = files("${rootDir}/detekt.yml")
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("com.squareup.okhttp3:okhttp:4.9.2")
implementation("com.google.protobuf:protobuf-java:3.17.3")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("junit:junit:4.13.2")
Comment on lines +32 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't my area of expertise, but from looking at other bits of code, I think there's a pattern of tracking dependencies via aliases to the toml.

}

version = "1.0.0"

tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "MainKt"
}
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
}

publishing {
publications {
create<MavenPublication>("myMavenPublication") {
from(components["java"])
groupId = "com.example"
artifactId = "maestro"
version = "1.0.0"

pom {
name.set("Maestro Project")
description.set("A Kotlin project for automating tasks in the Maestro system")
url.set("https://github.com/Franlexa/maestro")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
}
}
}
repositories {
maven {
url = uri("file://${buildDir}/repo") // Local repo for testing
}
}
}

tasks.register("cleanBuild") {
dependsOn("clean", "build")
group = "Build"
description = "Cleans and rebuilds the project."
}

Binary file added dist/maestro-0.1.0.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this binary be included?

Binary file not shown.
Loading