-
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.
Merge pull request #24 from usefulness/updates
- Loading branch information
Showing
9 changed files
with
118 additions
and
6 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
2 changes: 0 additions & 2 deletions
2
licensee-for-android-core/src/main/kotlin/io/github/usefulness/licensee/Artifact.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: 3 additions & 0 deletions
3
licensee-for-android-core/src/main/kotlin/io/github/usefulness/licensee/Poko.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.github.usefulness.licensee | ||
|
||
internal annotation class Poko |
53 changes: 53 additions & 0 deletions
53
licensee-for-android-core/src/testFixtures/kotlin/io/github/usefulness/licensee/Stubs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package io.github.usefulness.licensee | ||
|
||
class FakeLicensee(override val artifacts: List<Artifact>) : Licensee | ||
|
||
fun stubArtifact( | ||
groupId: String = "com.example", | ||
artifactId: String = "foo-bar", | ||
version: String = "0.1.0-alpha04", | ||
name: String? = "Fixture Name of $groupId:$artifactId:$version", | ||
spdxLicenses: List<SpdxLicense> = listOf(stubSpdxLicense()), | ||
scm: Scm? = stubScm(), | ||
unknownLicenses: List<UnknownLicense> = listOf(stubUnknownLicense()), | ||
) = Artifact( | ||
groupId = groupId, | ||
artifactId = artifactId, | ||
version = version, | ||
name = name, | ||
spdxLicenses = spdxLicenses, | ||
scm = scm, | ||
unknownLicenses = unknownLicenses, | ||
) | ||
|
||
fun stubSpdxLicense( | ||
identifier: String = "Apache-2.0", | ||
name: String = "Apache License 2.0", | ||
url: String = "https://www.apache.org/licenses/LICENSE-2.0", | ||
) = SpdxLicense( | ||
identifier = identifier, | ||
name = name, | ||
url = url, | ||
) | ||
|
||
fun stubApacheLicense() = stubSpdxLicense( | ||
identifier = "Apache-2.0", | ||
name = "Apache License 2.0", | ||
url = "https://www.apache.org/licenses/LICENSE-2.0", | ||
) | ||
|
||
fun stubMitLicense() = stubSpdxLicense( | ||
identifier = "MIT", | ||
name = "MIT License", | ||
url = "https://opensource.org/licenses/MIT", | ||
) | ||
|
||
fun stubScm(url: String = "url") = Scm(url = url) | ||
|
||
fun stubUnknownLicense( | ||
name: String = "Android Software Development Kit License", | ||
url: String = "https://developer.android.com/studio/terms.html", | ||
) = UnknownLicense( | ||
name = name, | ||
url = url, | ||
) |
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 @@ | ||
kotlin.stdlib.default.dependency=false |