Skip to content

Commit

Permalink
feature #866: init project and properties
Browse files Browse the repository at this point in the history
  • Loading branch information
chattymin committed Sep 21, 2024
1 parent 81d1b52 commit e637204
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 0 deletions.
1 change: 1 addition & 0 deletions feature/fortune/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
64 changes: 64 additions & 0 deletions feature/fortune/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
plugins {
sopt("feature")
sopt("compose")
alias(libs.plugins.ksp)
alias(libs.plugins.ktlint)
alias(libs.plugins.secret)
}

android {
defaultConfig {
vectorDrawables {
useSupportLibrary = true
}
}
libraryVariants.all {
sourceSets {
getByName(name) {
java.srcDir("build/generated/ksp/$name/kotlin")
}
}
}
namespace = "org.sopt.official.feature.fortune"
}

dependencies {
// core
implementation(projects.core.common)
implementation(projects.core.analytics)

// compose
implementation(libs.kotlin.collections.immutable)
implementation(platform(libs.compose.bom))
implementation(libs.bundles.compose)
implementation(libs.compose.destination.core)
ksp(libs.compose.destination.ksp)

// etc
implementation(libs.kotlin.datetime)
implementation(libs.coil.compose)

// test
testImplementation(libs.junit)
androidTestImplementation(libs.bundles.compose.test)
androidTestImplementation(libs.bundles.android.test)
debugImplementation(libs.bundles.compose.android.test)
}

secrets {
defaultPropertiesFileName = "secrets.defaults.properties"

ignoreList.add("sdk.*")
}

ktlint {
android.set(true)
debug.set(true)
coloredOutput.set(true)
verbose.set(true)
outputToConsole.set(true)
filter {
exclude { projectDir.toURI().relativize(it.file.toURI()).path.contains("/generated/") }
exclude { it.file.name.contains("gradle") }
}
}
Empty file.
21 changes: 21 additions & 0 deletions feature/fortune/proguard-rules.pro
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.sopt.official.feature.fortune

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("org.sopt.official.feature.fortune.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions feature/fortune/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.sopt.official.feature.fortune

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)
}
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ include(
":feature:notification",
":feature:soptamp",
":feature:poke",
":feature:fortune"
)

0 comments on commit e637204

Please sign in to comment.