Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierfrancesco Gulinelli authored and Pierfrancesco Gulinelli committed Dec 20, 2023
2 parents 5ce6c9f + e523163 commit d415df0
Show file tree
Hide file tree
Showing 25 changed files with 482 additions and 335 deletions.
8 changes: 4 additions & 4 deletions annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}

sourceCompatibility = "7"
targetCompatibility = "7"
sourceCompatibility = "17"
targetCompatibility = "17"

repositories {
mavenCentral()
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}
}
22 changes: 12 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,26 @@ plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.funnydevs.hilt-conductor.plugin'
id 'dagger.hilt.android.plugin'
id 'com.funnydevs.hilt-conductor.plugin'
}


android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdk 33
buildToolsVersion = "33.0.1"

defaultConfig {
applicationId "com.funnydevs.hilt_conductor.demo"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"
multiDexEnabled = true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
abortOnError false
}

buildTypes {
release {
Expand All @@ -32,12 +30,16 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
lint {
abortOnError false
}
namespace 'com.funnydevs.hilt_conductor.demo'
}

dependencies {
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.funnydevs.hilt_conductor.demo">
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
Expand All @@ -10,7 +10,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/com/funnydevs/hilt_conductor/demo/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import android.app.Application
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class App : Application() {
}
class App : Application()
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.funnydevs.hilt_conductor.demo

import android.os.Bundle
import com.bluelinelabs.conductor.Controller
import javax.inject.Inject
import javax.inject.Named

abstract class BaseBaseController(args: Bundle?) : Controller(args) {

@Inject
@Named("second")
lateinit var secondText: String
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.funnydevs.hilt_conductor.demo

import android.os.Bundle
import com.bluelinelabs.conductor.Controller
import javax.inject.Inject
import javax.inject.Named

abstract class BaseController(args: Bundle?) : Controller(args) {
abstract class BaseController(args: Bundle?): BaseBaseController(args) {

@Inject
@Named("second")
lateinit var testo: String
@Named("first")
lateinit var text: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.funnydevs.hilt_conductor.annotations.ControllerScoped
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.scopes.ActivityScoped
import javax.inject.Named

@InstallIn(ControllerComponent::class)
Expand All @@ -20,7 +21,7 @@ object HiltModule {
@Provides
@ControllerScoped
@Named("second")
fun textTwo(controller: Controller): String {
fun textTwo(): String {
return "Hello Moon"
}
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
package com.funnydevs.hilt_conductor.demo

import android.annotation.SuppressLint
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.bluelinelabs.conductor.Controller
import com.funnydevs.hilt_conductor.ConductorInterface
import com.funnydevs.hilt_conductor.annotations.ConductorEntryPoint
import com.funnydevs.hilt_conductor.annotations.ControllerScoped
import dagger.hilt.EntryPoints
import dagger.hilt.android.EntryPointAccessors
import javax.inject.Inject
import javax.inject.Named

@ConductorEntryPoint
class MainController(args: Bundle?) : BaseController(args) {



@SuppressLint("SetTextI18n")
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup,
savedViewState: Bundle?
): View {
System.out.println()
val view = inflater.inflate(R.layout.controller_main, container, false)
view.findViewById<TextView>(R.id.tv_test).text = testo
view.findViewById<TextView>(R.id.tv_test).text = "$text $secondText"
return view
}


}

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath 'com.android.tools.build:gradle:8.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath "com.google.dagger:hilt-android-gradle-plugin:$versions.hilt"
classpath "io.github.funnydevs:hilt-conductor-plugin:$VERSION"
Expand Down
13 changes: 7 additions & 6 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ext.versions = [


appcompat : "1.3.0-rc01",
kotlin : "1.4.31",
appcompat : "1.6.1",
kotlin : '1.8.0',
conductor : "3.0.0-rc4",
timber : "4.7.1",
hilt : "2.35",
hilt : '2.49',
navigation : "2.3.4",
material : "1.4.0-alpha02",
javassist : "3.27.0-GA",
material : "1.9.0",
asm : "9.6",
auto_service : "1.0-rc4",
javapoet : "1.13.0",
javax_inject : "1"
Expand All @@ -24,7 +24,8 @@ ext.libraries = [
hilt_android_compiler : "com.google.dagger:hilt-android-compiler:$versions.hilt",
material : "com.google.android.material:material:$versions.material",
stdlib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin",
javassist : "org.javassist:javassist:$versions.javassist",
asm : "org.ow2.asm:asm:$versions.asm",
asmCommons : "org.ow2.asm:asm-commons:$versions.asm",
auto_service : "com.google.auto.service:auto-service:$versions.auto_service",
javapoet : "com.squareup:javapoet:$versions.javapoet",
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin",
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ android.enableJetifier=false
kotlin.code.style=official

GROUP=io.github.funnydevs
VERSION=0.5.0
VERSION=0.5.1
android.nonTransitiveRClass=true



Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Apr 23 14:34:01 CEST 2021
#Fri Dec 08 11:42:47 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
20 changes: 13 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdk 33
buildToolsVersion "33.0.1"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName VERSION
targetSdkVersion 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -26,8 +24,16 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
namespace 'com.funnydevs.hilt_conductor'

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

Expand Down
5 changes: 0 additions & 5 deletions library/src/main/AndroidManifest.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

import dagger.BindsInstance;
import dagger.hilt.DefineComponent;
import dagger.hilt.android.components.ActivityComponent;
import dagger.hilt.android.components.ActivityRetainedComponent;
import dagger.hilt.android.scopes.ActivityRetainedScoped;
import dagger.hilt.components.SingletonComponent;

@ControllerScoped
@DefineComponent(parent = ActivityRetainedComponent.class)
Expand Down
9 changes: 5 additions & 4 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ repositories {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {

implementation 'com.android.tools.build:gradle:4.0.0'
implementation 'com.android.tools.build:gradle:8.0.2'
implementation libraries.asm
implementation libraries.asmCommons
implementation gradleApi()
implementation localGroovy()
implementation libraries.stdlib
implementation libraries.javassist
}


Expand Down

This file was deleted.

Loading

0 comments on commit d415df0

Please sign in to comment.