-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
170 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import java.net.URI | ||
|
||
group = "io.github.sergkhram" | ||
version = "1.2.11-RELEASE" | ||
|
||
plugins { | ||
kotlin("jvm") | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
dependencies { | ||
implementation("com.fasterxml.jackson.core:jackson-databind:2.12.3") | ||
implementation(kotlin("stdlib-jdk8")) | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") | ||
implementation("com.malinskiy.adam:adam:0.4.3") | ||
implementation("org.apache.ant:ant:1.8.2") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
signing { | ||
sign(publishing.publications) | ||
} | ||
|
||
publishing { | ||
val sonatypeUsername = System.getProperty("sonatypeUsername") | ||
val sonatypePassword = System.getProperty("sonatypePassword") | ||
val javaPlugin = project.the(JavaPluginConvention::class) | ||
|
||
val sourcesJar by project.tasks.creating(org.gradle.api.tasks.bundling.Jar::class) { | ||
classifier = "sources" | ||
from(javaPlugin.sourceSets["main"].allSource) | ||
} | ||
val javadocJar by project.tasks.creating(org.gradle.api.tasks.bundling.Jar::class) { | ||
classifier = "javadoc" | ||
from(javaPlugin.docsDir) | ||
dependsOn("javadoc") | ||
} | ||
|
||
publications { | ||
create("default", MavenPublication::class.java) { | ||
from(project.components["java"]) | ||
artifact(sourcesJar) | ||
artifact(javadocJar) | ||
pom { | ||
name.set("ares-core") | ||
url.set("https://github.com/SergKhram/ARES") | ||
description.set("Android Core") | ||
|
||
this.licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
|
||
this.developers { | ||
developer { | ||
id.set("serg-khram-team") | ||
name.set("Sergei Khramkov") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
this.scm { | ||
url.set("https://github.com/SergKhram/ARES") | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url = URI.create("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = sonatypeUsername | ||
password = sonatypePassword | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package io.github.sergkhram | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import io.github.sergkhram.configuration.Configuration | ||
import io.github.sergkhram.configuration.EnrichVariant | ||
import io.github.sergkhram.enrich.CleanAllureEnrichService | ||
import io.github.sergkhram.enrich.MarathonEnrichService | ||
import java.io.File | ||
import io.github.sergkhram.logger as customLogger | ||
|
||
class AresCore(val outputDir: File, val log: File, val projectPath: String) { | ||
private val allureDeviceResDirectory: (String) -> File = { | ||
val marathonZeroSixOnePath = "${Configuration.getReportDirectory(it)}allure-device-results" | ||
val marathonZeroSixTwoPath = "${Configuration.getReportDirectory(it)}device-files${Configuration.separator}allure-results" | ||
if(File(marathonZeroSixOnePath).exists()) File(marathonZeroSixOnePath) else File(marathonZeroSixTwoPath) | ||
} | ||
private val marathonAllureResDirectory: (String) -> File = { | ||
File("${Configuration.getReportDirectory(it)}allure-results") | ||
} | ||
|
||
fun execute() { | ||
recursivelyDelete(outputDir) | ||
Configuration.logFile = log | ||
customLogger.info("Applying ares plugin") | ||
val projectDirectory = projectPath | ||
customLogger.info("Creating directory for allure-results if doesn't exist") | ||
createAllureResultsDirectory(projectDirectory) // create directory for allure-results if not exists | ||
|
||
val mapper = ObjectMapper() | ||
val service = when (Configuration.enrichBy) { | ||
EnrichVariant.MARATHON -> { | ||
customLogger.info("Selected method for getting results is from Marathon") | ||
MarathonEnrichService( | ||
marathonAllureResDirectory(projectDirectory), | ||
mapper, | ||
projectDirectory, | ||
allureDeviceResDirectory(projectDirectory) | ||
) | ||
} | ||
EnrichVariant.CLEAN_ALLURE -> { | ||
customLogger.info("Selected method for getting results is from device(clean allure)") | ||
CleanAllureEnrichService( | ||
mapper, | ||
projectDirectory | ||
) | ||
} | ||
} | ||
service.iterableEnrich() | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
ares-exec-plugin/src/main/kotlin/io/github/sergkhram/tasks/ExecutionWReportGenTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
ares-exec-plugin/src/main/kotlin/io/github/sergkhram/tasks/ExecutionWReportTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...m/configuration/ConfigurationExtension.kt → ...sergkhram/tasks/ConfigurationExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.