-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
84316bb
commit 8a22f0b
Showing
81 changed files
with
2,162 additions
and
604 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
import org.jmailen.gradle.kotlinter.tasks.LintTask | ||
import org.jmailen.gradle.kotlinter.tasks.FormatTask | ||
|
||
plugins { | ||
id 'com.android.application' version '8.0.2' apply false | ||
id 'com.android.library' version '8.0.2' apply false | ||
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false | ||
id 'org.jmailen.kotlinter' version '3.16.0' | ||
} | ||
|
||
tasks.register('ktLint', LintTask) { | ||
group 'formatting' | ||
source files('demo/src', 'library/src') | ||
reports = [ | ||
'checkstyle': file('build/reports/ktlint/main-lint.xml') | ||
] | ||
} | ||
|
||
tasks.register('ktFormat', FormatTask) { | ||
group 'formatting' | ||
source files('demo/src', 'library/src') | ||
report = file('build/reports/ktlint/format-report.txt') | ||
} |
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
22 changes: 0 additions & 22 deletions
22
library/src/androidTest/java/com/paypal/messages/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
library/src/androidTest/java/com/paypal/messages/extensions/IntTest.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,19 @@ | ||
package com.paypal.messages.extensions | ||
|
||
import android.content.res.Resources | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import kotlin.math.roundToInt | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class IntTest { | ||
@Test | ||
fun testDpExtension() { | ||
val basicInteger = 10 | ||
val expectedDp = (basicInteger * Resources.getSystem().displayMetrics.density).roundToInt() | ||
val actualDp = basicInteger.dp | ||
assertEquals(expectedDp, actualDp) | ||
} | ||
} |
Oops, something went wrong.