-
Notifications
You must be signed in to change notification settings - Fork 1
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 #682 from team-aliens/release/v1.3.0
Release/v1.3.0
- Loading branch information
Showing
55 changed files
with
959 additions
and
439 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="14dp" | ||
android:height="14dp" | ||
android:viewportWidth="14" | ||
android:viewportHeight="14"> | ||
<group> | ||
<clip-path | ||
android:pathData="M0,0h14v14h-14z"/> | ||
<path | ||
android:pathData="M9.175,5.65L8.35,4.825L2.917,10.259V11.083H3.741L9.175,5.65ZM10,4.825L10.824,4.001L10,3.176L9.175,4.001L10,4.825ZM4.225,12.25H1.75V9.775L9.587,1.938C9.696,1.829 9.845,1.767 10,1.767C10.154,1.767 10.302,1.829 10.412,1.938L12.062,3.588C12.172,3.698 12.233,3.846 12.233,4.001C12.233,4.155 12.172,4.304 12.062,4.413L4.225,12.25H4.225Z" | ||
android:fillColor="#999999"/> | ||
</group> | ||
</vector> |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> | ||
|
||
<path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v1c0,0.55 0.45,1 1,1h14c0.55,0 1,-0.45 1,-1v-1c0,-2.66 -5.33,-4 -8,-4z"/> | ||
|
||
</vector> |
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,9 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
android:width="30dp" | ||
android:height="30dp" | ||
android:viewportWidth="30" | ||
android:viewportHeight="30"> | ||
<path | ||
android:pathData="M6.545,12.563H11.141V17.158C11.141,17.625 11.525,18.017 12,18.017C12.474,18.017 12.858,17.625 12.858,17.158V12.563H17.454C17.921,12.563 18.313,12.178 18.313,11.704C18.313,11.229 17.921,10.845 17.454,10.845H12.858V6.249C12.858,5.782 12.474,5.391 12,5.391C11.525,5.391 11.141,5.782 11.141,6.249V10.845H6.545C6.078,10.845 5.687,11.229 5.687,11.704C5.687,12.178 6.078,12.563 6.545,12.563Z" | ||
android:fillColor="#1C1C1E"/> | ||
android:pathData="M8.183,15.703H13.927V21.447C13.927,22.031 14.407,22.521 15.001,22.521C15.594,22.521 16.074,22.031 16.074,21.447V15.703H21.819C22.402,15.703 22.892,15.223 22.892,14.63C22.892,14.036 22.402,13.556 21.819,13.556H16.074V7.812C16.074,7.228 15.594,6.738 15.001,6.738C14.407,6.738 13.927,7.228 13.927,7.812V13.556H8.183C7.599,13.556 7.109,14.036 7.109,14.63C7.109,15.223 7.599,15.703 8.183,15.703Z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
16 changes: 16 additions & 0 deletions
16
core/design-system/src/main/res/drawable/ic_profile_default.xml
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,16 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="150dp" | ||
android:height="153dp" | ||
android:viewportWidth="150" | ||
android:viewportHeight="153"> | ||
<path | ||
android:pathData="M75,75m-75,0a75,75 0,1 1,150 0a75,75 0,1 1,-150 0" | ||
android:fillColor="#DDDDDD"/> | ||
<group> | ||
<clip-path | ||
android:pathData="M74.91,93.42C88.8,93.42 100.59,81.06 100.59,65.06C100.59,49.45 88.74,37.47 74.91,37.47C61.02,37.47 49.1,49.64 49.16,65.19C49.16,81.06 60.95,93.42 74.91,93.42ZM35.15,152.68H114.54C125.06,152.68 128.69,149.49 128.69,143.63C128.69,127.26 107.92,104.7 74.84,104.7C41.84,104.7 21,127.26 21,143.63C21,149.49 24.63,152.68 35.15,152.68Z"/> | ||
<path | ||
android:pathData="M75,75m-75,0a75,75 0,1 1,150 0a75,75 0,1 1,-150 0" | ||
android:fillColor="#ffffff"/> | ||
</group> | ||
</vector> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
plugins { | ||
alias(libs.plugins.android.library) | ||
alias(libs.plugins.kotlin.android) | ||
} | ||
|
||
android { | ||
namespace = "team.aliens.dms.android.core.file" | ||
compileSdk = libs.versions.compileSdk.get().toInt() | ||
|
||
defaultConfig { | ||
minSdk = libs.versions.minSdk.get().toInt() | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = Versions.java | ||
targetCompatibility = Versions.java | ||
} | ||
kotlinOptions { | ||
jvmTarget = Versions.java.toString() | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation(libs.androidx.core) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.material) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso) | ||
} |
Empty file.
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
24 changes: 24 additions & 0 deletions
24
core/file/src/androidTest/java/team/aliens/dms/android/core/file/ExampleInstrumentedTest.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,24 @@ | ||
package team.aliens.dms.android.core.file | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("team.aliens.dms.android.core.file.test", appContext.packageName) | ||
} | ||
} |
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
78 changes: 78 additions & 0 deletions
78
core/file/src/main/java/team/aliens/dms/android/core/file/File.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,78 @@ | ||
package team.aliens.dms.android.core.file | ||
|
||
import android.content.Context | ||
import android.net.Uri | ||
import android.os.Environment | ||
import android.provider.OpenableColumns | ||
import java.io.File | ||
import java.io.FileOutputStream | ||
|
||
object File { | ||
fun toFile( | ||
context: Context, | ||
uri: Uri, | ||
): File { | ||
val fileName = getFileName( | ||
context = context, | ||
uri = uri, | ||
) | ||
val file = createTempFile( | ||
context = context, | ||
fileName = fileName, | ||
) | ||
|
||
copyToFile( | ||
context = context, | ||
uri = uri, | ||
file = file, | ||
) | ||
|
||
return File(file.absolutePath) | ||
} | ||
|
||
private fun copyToFile( | ||
context: Context, | ||
uri: Uri, | ||
file: File, | ||
) { | ||
val inputStream = context.contentResolver.openInputStream(uri) | ||
val outputStream = FileOutputStream(file) | ||
|
||
val buffer = ByteArray(4 * 1024) | ||
while (true) { | ||
val byteCount = inputStream!!.read(buffer) | ||
if (byteCount < 0) break | ||
outputStream.write(buffer, 0, byteCount) | ||
} | ||
|
||
inputStream.close() | ||
} | ||
|
||
private fun getFileName( | ||
uri: Uri, | ||
context: Context, | ||
): String { | ||
val cursor = context.contentResolver.query(uri, null, null, null, null) | ||
var fileName = "" | ||
|
||
cursor?.run { | ||
cursor.moveToFirst() | ||
val index = getColumnIndex(OpenableColumns.DISPLAY_NAME) | ||
if (index != -1) { | ||
fileName = cursor.getString(index) | ||
} | ||
} | ||
cursor?.close() | ||
|
||
return fileName | ||
} | ||
|
||
private fun createTempFile( | ||
context: Context, | ||
fileName: String, | ||
): File { | ||
val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES) | ||
|
||
return File(storageDir, fileName) | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
core/file/src/test/java/team/aliens/dms/android/core/file/ExampleUnitTest.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,17 @@ | ||
package team.aliens.dms.android.core.file | ||
|
||
import org.junit.Test | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Example local unit test, which will execute on the development machine (host). | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
class ExampleUnitTest { | ||
@Test | ||
fun addition_isCorrect() { | ||
assertEquals(4, 2 + 2) | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
core/network/src/main/java/team/aliens/dms/android/core/network/util/RequestType.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,5 @@ | ||
package team.aliens.dms.android.core.network.util | ||
|
||
object RequestType { | ||
const val Binary = "application/octet-stream" | ||
} |
5 changes: 5 additions & 0 deletions
5
core/network/src/main/java/team/aliens/dms/android/core/network/util/ResourceKeys.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,5 @@ | ||
package team.aliens.dms.android.core.network.util | ||
|
||
object ResourceKeys { | ||
const val IMAGE_URL = "https://image-dms.s3.ap-northeast-2.amazonaws.com/" | ||
} |
Oops, something went wrong.