mirror of
				https://github.com/lacerta-doc/Lacerta.git
				synced 2025-09-09 12:09:25 +00:00 
			
		
		
		
	UIの共有要素を含めるモジュールを作成
This commit is contained in:
		
							parent
							
								
									faf4f9bc1f
								
							
						
					
					
						commit
						f5cff1c43b
					
				| 
						 | 
					@ -24,6 +24,8 @@
 | 
				
			||||||
            <option value="$PROJECT_DIR$/feature/search" />
 | 
					            <option value="$PROJECT_DIR$/feature/search" />
 | 
				
			||||||
            <option value="$PROJECT_DIR$/model" />
 | 
					            <option value="$PROJECT_DIR$/model" />
 | 
				
			||||||
            <option value="$PROJECT_DIR$/processor" />
 | 
					            <option value="$PROJECT_DIR$/processor" />
 | 
				
			||||||
 | 
					            <option value="$PROJECT_DIR$/shared" />
 | 
				
			||||||
 | 
					            <option value="$PROJECT_DIR$/shared/ui" />
 | 
				
			||||||
            <option value="$PROJECT_DIR$/source" />
 | 
					            <option value="$PROJECT_DIR$/source" />
 | 
				
			||||||
            <option value="$PROJECT_DIR$/utils" />
 | 
					            <option value="$PROJECT_DIR$/utils" />
 | 
				
			||||||
          </set>
 | 
					          </set>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,3 +29,4 @@ include ':utils'
 | 
				
			||||||
include ':source'
 | 
					include ':source'
 | 
				
			||||||
include ':model'
 | 
					include ':model'
 | 
				
			||||||
include ':processor'
 | 
					include ':processor'
 | 
				
			||||||
 | 
					include ':shared:ui'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								shared/ui/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								shared/ui/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					/build
 | 
				
			||||||
							
								
								
									
										35
									
								
								shared/ui/build.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								shared/ui/build.gradle
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,35 @@
 | 
				
			||||||
 | 
					plugins {
 | 
				
			||||||
 | 
					    alias(libs.plugins.com.android.library)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					android {
 | 
				
			||||||
 | 
					    namespace 'one.nem.lacerta.shared.ui'
 | 
				
			||||||
 | 
					    compileSdk 34
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    defaultConfig {
 | 
				
			||||||
 | 
					        minSdk 26
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 | 
				
			||||||
 | 
					        consumerProguardFiles "consumer-rules.pro"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    buildTypes {
 | 
				
			||||||
 | 
					        release {
 | 
				
			||||||
 | 
					            minifyEnabled false
 | 
				
			||||||
 | 
					            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    compileOptions {
 | 
				
			||||||
 | 
					        sourceCompatibility JavaVersion.VERSION_1_8
 | 
				
			||||||
 | 
					        targetCompatibility JavaVersion.VERSION_1_8
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dependencies {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    implementation libs.androidx.appcompat
 | 
				
			||||||
 | 
					    implementation libs.com.google.android.material
 | 
				
			||||||
 | 
					    testImplementation libs.junit
 | 
				
			||||||
 | 
					    androidTestImplementation libs.androidx.test.ext.junit
 | 
				
			||||||
 | 
					    androidTestImplementation libs.androidx.test.espresso.core
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										0
									
								
								shared/ui/consumer-rules.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								shared/ui/consumer-rules.pro
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										21
									
								
								shared/ui/proguard-rules.pro
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								shared/ui/proguard-rules.pro
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,26 @@
 | 
				
			||||||
 | 
					package one.nem.lacerta.shared.ui;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.content.Context;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.test.platform.app.InstrumentationRegistry;
 | 
				
			||||||
 | 
					import androidx.test.ext.junit.runners.AndroidJUnit4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.junit.Test;
 | 
				
			||||||
 | 
					import org.junit.runner.RunWith;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static org.junit.Assert.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Instrumented test, which will execute on an Android device.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@RunWith(AndroidJUnit4.class)
 | 
				
			||||||
 | 
					public class ExampleInstrumentedTest {
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void useAppContext() {
 | 
				
			||||||
 | 
					        // Context of the app under test.
 | 
				
			||||||
 | 
					        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
 | 
				
			||||||
 | 
					        assertEquals("one.nem.lacerta.shared.ui.test", appContext.getPackageName());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										4
									
								
								shared/ui/src/main/AndroidManifest.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								shared/ui/src/main/AndroidManifest.xml
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<manifest xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</manifest>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					package one.nem.lacerta.shared.ui;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.junit.Test;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static org.junit.Assert.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Example local unit test, which will execute on the development machine (host).
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class ExampleUnitTest {
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void addition_isCorrect() {
 | 
				
			||||||
 | 
					        assertEquals(4, 2 + 2);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user