Skip to content

Commit 096ede4

Browse files
authored
Merge pull request #57 from zouhir96/develop
release 1.1.0
2 parents 3c4989d + cb379ce commit 096ede4

File tree

204 files changed

+3522
-2378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+3522
-2378
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/.idea/assetWizardSettings.xml
1010
.DS_Store
1111
/build
12+
bin
1213
build
1314
/captures
1415
.externalNativeBuild

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,57 @@
1-
# hackertab-android
1+
# hackertab-mobile
22

33
<table align="center">
44
<tr>
55
<td>
6-
<img src="./imgs/preview.png" alt="Preview image" />
6+
<img src="imgs/preview.png" alt="Preview image" />
77
</td>
88
</tr>
99
</table>
1010

1111
## 📝 About
1212

13-
Hackertab brings the latest news, libraries, tech events, jobs... related to your profile (back-end,
14-
mobile, full stack, data scientist...) and visualize them in a proper way so you don't have to waste
15-
time jumping between different data sources.
13+
Cross-platform (Android/iOS) application built with Kotlin Multiplatform and Compose Multiplatform.
14+
Hackertab brings the latest news, repositories, libraries, tech events... related to your profile (
15+
mobile, back-end, full stack, data scientist...) and visualize them in a proper way so you don't
16+
have to waste time jumping between different data sources.
17+
It aggregates data from 11 sources, including GitHub, HackerNews, Dev.to, and Medium, with
18+
customizable source preferences. Follow 26+ topics like Android, Kotlin, Java, JavaScript, and
19+
TypeScript all visualized in an intuitive interface.
1620

17-
This is the Android version of [hackertab.dev](https://hackertab.dev) extension brought to your
21+
This is the Mobile(Non official) version of [hackertab.dev](https://hackertab.dev) extension brought to your
1822
phone now so you stay always posted even if you’re not on your pc.
1923

2024
## ⬇️ Download
2125

2226
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="90"/>](https://play.google.com/store/apps/details?id=com.zrcoding.hackertab)<br>
23-
You can check the [releases](https://github.com/zouhir96/hackertab-android/releases/latest) page for details.
27+
You can check the [releases](https://github.com/zouhir96/hackertab-android/releases/latest) page for
28+
details.
2429

2530
## 🔨 Stack
2631

2732
- Kotlin(2.0.0), coroutines
28-
- Jetpack compose
33+
- Kotlin multi-platform & Compose multi-platform
2934
- Clean architecture / MVVM
3035
- Multi-Module architecture
31-
- Dependency injection - Hilt
36+
- Dependency injection - Koin
3237
- Version catalog & Convention plugins
33-
- REST API / Retrofit2
38+
- REST API / Ktor client
3439
- Datastore-preferences
3540
- Github actions: Run tests, deploy to google play
36-
-
37-
Figma: [Design file](https://www.figma.com/file/IMFz1yU7jLCIQL1ZM0X8t7/Hackertab?type=design&node-id=0-1&mode=design&t=7yYklSUnlheLkOaN-0)
41+
42+
## 🛠️ Resources
43+
- Figma: [Design file](https://www.figma.com/file/IMFz1yU7jLCIQL1ZM0X8t7/Hackertab?type=design&node-id=0-1&mode=design&t=7yYklSUnlheLkOaN-0)
3844
- Trello: [Project board](https://trello.com/b/OaxWzI96/hackertab)
3945

4046
### Features
4147

4248
- [x] 11 sources of news: Github, Hackernews, Conferences, Devto, Producthunt, Reddit, Lobsters,
4349
Hashnode, Freecodecamp, IndieHackers and Medium.
4450
- [x] 26 Topics to follow: Android, Kotlin, Java, JavaScript, TypeScript ...
45-
- [x] Possibility to configure which sources to show.
46-
- [x] Possibility to configure which topics to show.
51+
- [x] Possibility to configure which sources to follow.
52+
- [x] Possibility to configure which topics to follow.
4753
- [x] Contact support by email.
48-
- [x] Support large screens.
54+
- [x] Support large screens (Tablet and Ipad).
4955
- [x] System light/dark mode support.
5056

5157
### Development

app/build.gradle.kts

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,48 @@
11
import org.gradle.api.tasks.testing.logging.TestLogEvent
22

33
plugins {
4-
id("hackertab.android.application")
5-
id("hackertab.android.application.compose")
6-
id("hackertab.android.hilt")
4+
alias(libs.plugins.android.application)
5+
alias(libs.plugins.android.kotlin)
6+
alias(libs.plugins.compose.compiler)
77
}
88

99
android {
1010
namespace = "com.zrcoding.hackertab"
1111

12+
compileSdk = Integer.parseInt(libs.versions.compileSdk.get())
1213
defaultConfig {
1314
applicationId = "com.zrcoding.hackertab"
1415
// The CI will take care of incrementing this using the build number.
1516
versionCode = 3
1617
versionName = libs.versions.versionName.get()
18+
19+
20+
minSdk = Integer.parseInt(libs.versions.minSdk.get())
21+
targetSdk = Integer.parseInt(libs.versions.targetSdk.get())
22+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
23+
vectorDrawables {
24+
useSupportLibrary = true
25+
}
26+
}
27+
28+
buildTypes {
29+
release {
30+
isMinifyEnabled = true
31+
isShrinkResources = true
32+
proguardFiles(
33+
getDefaultProguardFile("proguard-android-optimize.txt"),
34+
"proguard-rules.pro"
35+
)
36+
}
37+
}
38+
39+
compileOptions {
40+
sourceCompatibility = JavaVersion.VERSION_17
41+
targetCompatibility = JavaVersion.VERSION_17
42+
}
43+
44+
kotlinOptions {
45+
jvmTarget = libs.versions.jvmTarget.get()
1746
}
1847

1948
buildFeatures {
@@ -27,15 +56,19 @@ android {
2756
}
2857

2958
dependencies {
59+
implementation(project(":shared"))
60+
3061
implementation(project(":feature:home"))
3162
implementation(project(":feature:settings"))
63+
implementation(project(":core:network"))
3264

3365
// Activity
3466
implementation(libs.androidx.core.splashscreen)
3567
implementation(libs.androidx.activity)
3668

3769
implementation(libs.androidx.compose.materialWindow)
38-
implementation(libs.androidx.navigation)
70+
71+
implementation(libs.koin.core)
3972

4073
implementation(platform(libs.com.google.firebase.bom))
4174
implementation(libs.com.google.firebase.analytics)

app/proguard-rules.pro

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@
4343
-dontwarn android.arch.util.paging.CountedDataSource
4444
-dontwarn android.arch.persistence.room.paging.LimitOffsetDataSource
4545

46-
## Rules for Retrofit2
47-
-keepclasseswithmembers class * {
48-
@retrofit2.http.* <methods>;
49-
}
50-
-dontwarn okio.**
51-
-dontwarn okhttp3.**
52-
-dontwarn retrofit2.**
53-
# Platform calls Class.forName on types which do not exist on Android to determine platform.
54-
-dontnote retrofit2.Platform
55-
# Platform used when running on Java 8 VMs. Will not be used at runtime.
56-
-dontwarn retrofit2.Platform.Java8
57-
# Retain generic type information for use by reflection by converters and adapters.
58-
-keepattributes Signature
59-
# Retain declared checked exceptions for use by a Proxy instance.
60-
-keepattributes Exceptions
61-
6246
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
6347
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
6448

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<activity
1515
android:name=".MainActivity"
1616
android:exported="true"
17+
android:windowSoftInputMode="adjustResize"
1718
android:theme="@style/Theme.App.Starting">
1819
<intent-filter>
1920
<action android:name="android.intent.action.MAIN" />
Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
package com.zrcoding.hackertab
22

33
import android.app.Application
4-
import dagger.hilt.android.HiltAndroidApp
4+
import android.content.Context
5+
import com.zrcoding.hackertab.settings.presentation.common.AppConfig
6+
import com.zrcoding.hackertab.shared.di.initKoin
7+
import org.koin.core.module.dsl.singleOf
8+
import org.koin.dsl.bind
9+
import org.koin.dsl.module
510

6-
@HiltAndroidApp
7-
class Hackertab : Application()
11+
class Hackertab : Application() {
12+
13+
override fun onCreate() {
14+
super.onCreate()
15+
initKoin(
16+
appModule = module {
17+
single<Context> { this@Hackertab }
18+
singleOf(::AppConfigImpl) bind AppConfig::class
19+
},
20+
)
21+
}
22+
}
23+
24+
class AppConfigImpl: AppConfig {
25+
override val versionName: String
26+
get() = BuildConfig.VERSION_NAME
27+
}

app/src/main/kotlin/com/zrcoding/hackertab/MainActivity.kt

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,24 @@ package com.zrcoding.hackertab
33
import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
6-
import androidx.compose.material.Surface
76
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
87
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
98
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
10-
import androidx.compose.runtime.Composable
119
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
12-
import androidx.navigation.compose.rememberNavController
13-
import com.zrcoding.hackertab.design.theme.HackertabTheme
14-
import com.zrcoding.hackertab.navigation.MainNavHost
15-
import dagger.hilt.android.AndroidEntryPoint
10+
import androidx.core.view.WindowCompat
11+
import com.zrcoding.hackertab.shared.HackertabKmpApp
1612

17-
@AndroidEntryPoint
1813
class MainActivity : ComponentActivity() {
1914

2015
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
2116
override fun onCreate(savedInstanceState: Bundle?) {
2217
installSplashScreen()
23-
2418
super.onCreate(savedInstanceState)
19+
WindowCompat.setDecorFitsSystemWindows(window, false)
2520

2621
setContent {
2722
val widthSizeClass = calculateWindowSizeClass(this).widthSizeClass
28-
HackertabApp(widthSizeClass)
29-
}
30-
}
31-
}
32-
33-
@Composable
34-
fun HackertabApp(widthSizeClass: WindowWidthSizeClass) {
35-
HackertabTheme {
36-
val navController = rememberNavController()
37-
Surface {
38-
MainNavHost(
39-
navController = navController,
40-
isExpandedScree = widthSizeClass == WindowWidthSizeClass.Expanded
41-
)
23+
HackertabKmpApp(widthSizeClass == WindowWidthSizeClass.Expanded)
4224
}
4325
}
4426
}

app/src/main/kotlin/com/zrcoding/hackertab/navigation/NavHost.kt

Lines changed: 0 additions & 73 deletions
This file was deleted.

app/src/main/kotlin/com/zrcoding/hackertab/navigation/Screen.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)