From 595ed8aec0e7160f0fa4e5105647d910d2f6f7f8 Mon Sep 17 00:00:00 2001 From: Francis Nwagbo Date: Tue, 12 Nov 2024 19:28:56 +0100 Subject: [PATCH 1/6] Add setup instructions to README --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 1339c0fd08..ccf67f673a 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,34 @@ 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 +## Installation and Setup + +To get started with Maestro, follow these steps: + +### Prerequisites + +Before you can start using Maestro, ensure that you have the following installed: + +- **Java 8 or newer** – Maestro requires Java to run. You can download it from [Oracle's Java downloads page](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html). +- **Android SDK** – For Android testing, ensure you have the Android SDK set up. You can download it from [here](https://developer.android.com/studio). +- **Xcode** (for iOS testing) – To run tests on iOS, you'll need Xcode installed. Download it from the [Mac App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12). + +### Installation + +1. **Clone the Repository**: + Clone the Maestro repository to your local machine: + ```bash + git clone https://github.com/mobile-dev-inc/maestro.git + cd maestro +### Install Dependencies: +brew install gradle # On macOS +apt-get install gradle # On Ubuntu + +### You can then build the project +./gradlew build + +### Set Up Your Device +adb devices + +### Run Tests +./gradlew test From 2ab3b81240cab5a90941056c1a17a77a064be4b5 Mon Sep 17 00:00:00 2001 From: Francis Nwagbo Date: Fri, 15 Nov 2024 19:19:58 +0100 Subject: [PATCH 2/6] chore: configure Gradle for build, packaging, and publishing\n- Added custom build logic to `build.gradle.kts` for creating JAR files.\n- Integrated publishing task for deployment readiness.\n- Enhanced compatibility with Java 1.8 using compiler options. --- README.md | 60 ++++++++++++++++++++++-------------------------- build.gradle.kts | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index ccf67f673a..0b55204578 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,34 @@ 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 +./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 + +## Run Tests + +To run all tests, execute: + +./gradlew test + +## Publish + +If you have configured publishing for this project, you can publish it with: + +./gradlew publish + ## Resources ### Documentation @@ -40,35 +68,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 - -## Installation and Setup - -To get started with Maestro, follow these steps: - -### Prerequisites - -Before you can start using Maestro, ensure that you have the following installed: - -- **Java 8 or newer** – Maestro requires Java to run. You can download it from [Oracle's Java downloads page](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html). -- **Android SDK** – For Android testing, ensure you have the Android SDK set up. You can download it from [here](https://developer.android.com/studio). -- **Xcode** (for iOS testing) – To run tests on iOS, you'll need Xcode installed. Download it from the [Mac App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12). - -### Installation - -1. **Clone the Repository**: - Clone the Maestro repository to your local machine: - ```bash - git clone https://github.com/mobile-dev-inc/maestro.git - cd maestro -### Install Dependencies: -brew install gradle # On macOS -apt-get install gradle # On Ubuntu - -### You can then build the project -./gradlew build - -### Set Up Your Device -adb devices - -### Run Tests -./gradlew test diff --git a/build.gradle.kts b/build.gradle.kts index d06fb57a65..87ffed4b80 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") +} + +version = "1.0.0" + +tasks.withType { + manifest { + attributes["Main-Class"] = "MainKt" + } + from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) +} + +publishing { + publications { + create("maven") { + 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." +} + From 0cb54a01a201f33c87da1eca611895af8489eafd Mon Sep 17 00:00:00 2001 From: Francis Nwagbo Date: Fri, 15 Nov 2024 19:26:56 +0100 Subject: [PATCH 3/6] docs: update README with build, test, and run instructions - Added detailed steps for building, packaging, and running the application. - Included instructions for testing and publishing tasks using Gradle. - Ensured clarity for contributors and users in README. --- dist/maestro-0.1.0.tar.gz | Bin 0 -> 63 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dist/maestro-0.1.0.tar.gz diff --git a/dist/maestro-0.1.0.tar.gz b/dist/maestro-0.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4d52812aa8325f4e142bffc6418daaf3de03470d GIT binary patch literal 63 zcmb2|=HOre0;d1DiK)dUMfti0dWL!idL@ZP3~vuI@&cs}E%@%A%V)j-qznui%$aB1 LlT~NXU|;|M6sHfG literal 0 HcmV?d00001 From e80b1cf3d278c45bbc6c48bb303f04891aa974a9 Mon Sep 17 00:00:00 2001 From: Francis Nwagbo Date: Fri, 15 Nov 2024 20:23:18 +0100 Subject: [PATCH 4/6] docs: update README with build, test, and run instructions - Added detailed steps for building, packaging, and running the application. - Included instructions for testing and publishing tasks using Gradle. - Ensured clarity for contributors and users in README. --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 87ffed4b80..cfe4d91f34 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,7 +47,7 @@ tasks.withType { publishing { publications { - create("maven") { + create("myMavenPublication") { from(components["java"]) groupId = "com.example" artifactId = "maestro" From c96e078ce35003342e5d92f2c723a91bed7f49af Mon Sep 17 00:00:00 2001 From: Francis Nwagbo Date: Fri, 15 Nov 2024 20:39:01 +0100 Subject: [PATCH 5/6] chore: configure Gradle for build, packaging, and publishing\n- Added custom build logic to `build.gradle.kts` for creating JAR files.\n- Integrated publishing task for deployment readiness.\n- Enhanced compatibility with Java 1.8 using compiler options. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0b55204578..ac136061f3 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Build and Package To build and package the project, run the following commands: +./gradlew build --stacktrace ./gradlew build ./gradlew jar From 1bef1fec5553ad96a9282fd6dac9fa1705aea7fa Mon Sep 17 00:00:00 2001 From: Francis Nwagbo Date: Fri, 15 Nov 2024 20:44:44 +0100 Subject: [PATCH 6/6] docs: update README with build, test, and run instructions - Added detailed steps for building, packaging, and running the application. - Included instructions for testing and publishing tasks using Gradle. - Ensured clarity for contributors and users in README. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ac136061f3..981dc7fb20 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ 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.