Skip to content

Commit

Permalink
Bug fix duplicate package
Browse files Browse the repository at this point in the history
  • Loading branch information
KangTaeJong98 committed Sep 9, 2021
1 parent f0ac4c8 commit dfbb868
Show file tree
Hide file tree
Showing 23 changed files with 40 additions and 72 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.taetae98.gesturelayout"
applicationId "com.taetae98.gesture"
minSdkVersion 24
targetSdkVersion 30
versionCode 1
Expand Down Expand Up @@ -37,6 +37,9 @@ android {
}

dependencies {
implementation project(path: ':modules')
implementation 'com.github.KangTaeJong98:Library:4.0.2'

// ViewModel
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version"
Expand All @@ -50,7 +53,6 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation project(path: ':Module')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.taetae98.gesturelayout
package com.taetae98.gesture

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
4 changes: 2 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.taetae98.gesturelayout">
package="com.taetae98.gesture">

<application
android:allowBackup="true"
Expand All @@ -9,7 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.GestureLayout">
<activity android:name=".activity.MainActivity">
<activity android:name="com.taetae98.gesture.activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.taetae98.gesturelayout.activity
package com.taetae98.gesture.activity

import android.os.Bundle
import android.view.MotionEvent
import android.view.View
import android.widget.Toast
import androidx.activity.viewModels
import com.taetae98.gesturelayout.R
import com.taetae98.gesturelayout.base.BindingActivity
import com.taetae98.gesturelayout.databinding.ActivityMainBinding
import com.taetae98.gesturelayout.viewmodel.MainActivityViewModel
import com.taetae98.module.gesture.listener.GestureListener
import com.taetae98.gesture.R
import com.taetae98.gesture.databinding.ActivityMainBinding
import com.taetae98.gesture.viewmodel.MainActivityViewModel
import com.taetae98.modules.gesture.listener.GestureListener
import com.taetae98.modules.library.binding.BindingActivity

class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main) {
private val viewModel by viewModels<MainActivityViewModel> { MainActivityViewModel.Factory(binding.textView) }
Expand All @@ -26,7 +26,7 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main
}

private fun onCreateOnGestureListener() {
val listenenr = object : GestureListener() {
val listener = object : GestureListener() {
override fun onDrag(view: View, event: MotionEvent, distanceX: Float, distanceY: Float) {
super.onDrag(view, event, distanceX, distanceY)
viewModel.translationX.value = view.translationX
Expand Down Expand Up @@ -66,6 +66,8 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main

override fun onZoom(view: View, event: MotionEvent, scale: Float) {
super.onZoom(view, event, scale)
viewModel.scaleX.value = view.scaleX
viewModel.scaleY.value = view.scaleY
viewModel.log.value += "Zoom : $scale\n"
}

Expand All @@ -81,6 +83,7 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main

override fun onRotate(view: View, event: MotionEvent, degree: Float) {
super.onRotate(view, event, degree)
viewModel.rotation.value = view.rotation
viewModel.log.value += "Rotate : $degree\n"
}

Expand All @@ -90,7 +93,7 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main
}
}

binding.textView.setOnTouchListener(listenenr)
binding.textView.setOnTouchListener(listener)
}

private fun onCreateTextViewOnClickListener() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.taetae98.gesturelayout.viewmodel
package com.taetae98.gesture.viewmodel

import android.view.View
import androidx.lifecycle.MutableLiveData
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<data>
<variable
name="viewModel"
type="com.taetae98.gesturelayout.viewmodel.MainActivityViewModel" />
type="com.taetae98.gesture.viewmodel.MainActivityViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.taetae98.module
package com.taetae98.gesture

import org.junit.Test

Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
classpath "com.android.tools.build:gradle:4.2.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -24,6 +24,7 @@ allprojects {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url 'https://jitpack.io' }
}
}

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions Module/build.gradle → modules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 24
targetSdkVersion 31
versionCode 1
versionName "1.0.1"
versionName "1.0.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -50,16 +50,16 @@ afterEvaluate {
// which results in publishing an app bundle.
from components.release

groupId = 'com.taetae98.module'
version = '1.0.1'
groupId = 'com.taetae98.modules.gesture'
version = '1.0.2'
}
debug(MavenPublication) {
// The following applies a component to this publication
// which results in publishing APKs in a ZIP file.
from components.debug

groupId = 'com.taetae98.module'
version = '1.0.1'
groupId = 'com.taetae98.modules.gesture'
version = '1.0.2'
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.taetae98.module
package com.taetae98.modules.gesture

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.taetae98.module.test", appContext.packageName)
assertEquals("com.taetae98.modules.gesture.test", appContext.packageName)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.taetae98.module">
package="com.taetae98.modules.gesture">

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.taetae98.module.gesture.listener
package com.taetae98.modules.gesture.listener

import android.graphics.PointF
import android.view.MotionEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.taetae98.module.gesture.view
package com.taetae98.modules.gesture.view

import android.content.Context
import android.util.AttributeSet
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.children
import androidx.core.view.setPadding
import com.taetae98.module.R
import com.taetae98.module.gesture.listener.GestureListener
import com.taetae98.modules.gesture.listener.GestureListener
import com.taetae98.modules.gesture.R


class GestureLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0) : ConstraintLayout(context, attrs, defStyleAttr, defStyleRes) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.taetae98.gesturelayout
package com.taetae98.modules.gesture

import org.junit.Test

Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = "GestureLayout"
rootProject.name = "Gesture"
include ':app'
include ':Module'
include ':modules'

0 comments on commit dfbb868

Please sign in to comment.