Say you have a code base that you just created and you have two commits locally:
commit a
commit b
This is your “version history”. You then push these commits to your remote. Now you have two repos with the same history:
| * What went wrong: | |
| Execution failed for task ':app:checkDebugAndroidTestDuplicateClasses'. | |
| > 1 exception was raised by workers: | |
| java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class org.apache.maven.artifact.Artifact found in modules maven-ant-tasks-2.1.3.jar (org.apache.maven:maven-ant-tasks:2.1.3) and maven-artifact-2.2.1.jar (org.apache.maven:maven-artifact:2.2.1) | |
| Duplicate class org.apache.maven.artifact.ArtifactStatus found in modules maven-ant-tasks-2.1.3.jar (org.apache.maven:maven-ant-tasks:2.1.3) and maven-artifact-2.2.1.jar (org.apache.maven:maven-artifact:2.2.1) | |
| Duplicate class org.apache.maven.artifact.ArtifactUtils found in modules maven-ant-tasks-2.1.3.jar (org.apache.maven:maven-ant-tasks:2.1.3) and maven-artifact-2.2.1.jar (org.apache.maven:maven-artifact:2.2.1) | |
| Duplicate class org.apache.maven.artifact.DefaultArtifact found in modules maven-ant-tasks-2.1.3.jar (org.apache.maven:maven-ant-tasks:2.1.3) and maven-artifact-2.2.1.jar (org.apache.maven:maven-artifact:2.2.1 |
Issue General Information
This is a sample issue to be used as a template for every bugs or even suggestion for improvement. Issue raised in each repository better be following this sample issue structure. The first section is general info of the issue while this paragraph also works as an general info example. Every problem occurred in development cycle MUST be written as repository issue to ease problem follow-ups.
Step to Reproduce
| #!/bin/bash | |
| clear | |
| ./gradlew clean mergedJacocoReport | |
| ./gradlew jacocoFullReport | |
| REPORT_PATH="file://$(pwd)/build/reports/jacoco/jacocoFullReport/html/index.html" | |
| echo ${REPORT_PATH} | pbcopy | |
| echo "Report available at:" | |
| echo ${REPORT_PATH} | |
| echo "Report file path copied to clipboard. You can paste it in your favorite browser. :)" |
| /** | |
| * Publish Android Kotlin Library Helper | |
| * | |
| * This Gradle script is based on https://gist.github.com/Robyer/a6578e60127418b380ca133a1291f017. | |
| * The difference is that: | |
| * 1. It uses Dokka for generating Kotlin Javadoc. | |
| * 2. It uses Jfrog's plugin for publishing to Bintray. If you don't want to publish to Bintray, simply remove all the Bintray-related code. | |
| * | |
| * NOTE: You need to add Dokka and Bintray to your classpath for the two plugins to work. | |
| * Update the buildscript in your project's build.gradle with the following: |
| #!/usr/bin/env bash | |
| # Original by Dan Lew | |
| # | |
| # I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very | |
| # well, so I wrote my own script to do the simple job of converting package names. | |
| # | |
| # You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv | |
| # | |
| # It'll run faster on a clean build because then there are fewer files to scan over. | |
| # |
| import kotlin.coroutines.* | |
| import kotlin.coroutines.intrinsics.* | |
| /** | |
| * Defines deep recursive function that keeps its stack on the heap, | |
| * which allows very deep recursive computations that do not use the actual call stack. | |
| * To initiate a call to this deep recursive function use its [invoke] function. | |
| * As a rule of thumb, it should be used if recursion goes deeper than a thousand calls. | |
| * | |
| * The [DeepRecursiveFunction] takes one parameter of type [T] and returns a result of type [R]. |
| fun Any?.toHashMap(): HashMap<String, RequestBody> { | |
| val map = HashMap<String, RequestBody>() | |
| if(this == null){ | |
| return map | |
| } | |
| for (field in this.javaClass.declaredFields) { | |
| val temp = field.isAccessible | |
| field.isAccessible = true |
| data class Worker( | |
| val quality: Int, | |
| val wage: Int, | |
| val ratio: Double = wage.toDouble() / quality.toDouble() | |
| ) | |
| class MaxHeap(private var capacity: Int = 32) { | |
| private var array = arrayOfNulls<Worker>(capacity) | |
| var size = 0 |