mirror of
				https://github.com/johrpan/musicus_mobile.git
				synced 2025-10-26 18:57:25 +01:00 
			
		
		
		
	Add musicus_player plugin skeleton
This commit is contained in:
		
							parent
							
								
									c8e831c461
								
							
						
					
					
						commit
						3e614d77aa
					
				
					 9 changed files with 147 additions and 0 deletions
				
			
		
							
								
								
									
										8
									
								
								musicus_player/android/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								musicus_player/android/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| gradle-wrapper.jar | ||||
| /.gradle | ||||
| /gradle | ||||
| /captures/ | ||||
| /gradlew | ||||
| /gradlew.bat | ||||
| /local.properties | ||||
| GeneratedPluginRegistrant.java | ||||
							
								
								
									
										43
									
								
								musicus_player/android/build.gradle
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								musicus_player/android/build.gradle
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| group 'de.johrpan.musicus_player' | ||||
| version '1.0-SNAPSHOT' | ||||
| 
 | ||||
| buildscript { | ||||
|     ext.kotlin_version = '1.3.50' | ||||
|     repositories { | ||||
|         google() | ||||
|         jcenter() | ||||
|     } | ||||
| 
 | ||||
|     dependencies { | ||||
|         classpath 'com.android.tools.build:gradle:3.5.0' | ||||
|         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| rootProject.allprojects { | ||||
|     repositories { | ||||
|         google() | ||||
|         jcenter() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| apply plugin: 'com.android.library' | ||||
| apply plugin: 'kotlin-android' | ||||
| 
 | ||||
| android { | ||||
|     compileSdkVersion 28 | ||||
| 
 | ||||
|     sourceSets { | ||||
|         main.java.srcDirs += 'src/main/kotlin' | ||||
|     } | ||||
|     defaultConfig { | ||||
|         minSdkVersion 16 | ||||
|     } | ||||
|     lintOptions { | ||||
|         disable 'InvalidPackage' | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| dependencies { | ||||
|     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||||
| } | ||||
							
								
								
									
										4
									
								
								musicus_player/android/gradle.properties
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								musicus_player/android/gradle.properties
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| org.gradle.jvmargs=-Xmx1536M | ||||
| android.enableR8=true | ||||
| android.useAndroidX=true | ||||
| android.enableJetifier=true | ||||
							
								
								
									
										1
									
								
								musicus_player/android/settings.gradle
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								musicus_player/android/settings.gradle
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| rootProject.name = 'musicus_player' | ||||
							
								
								
									
										3
									
								
								musicus_player/android/src/main/AndroidManifest.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								musicus_player/android/src/main/AndroidManifest.xml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|   package="de.johrpan.musicus_player"> | ||||
| </manifest> | ||||
|  | @ -0,0 +1,27 @@ | |||
| package de.johrpan.musicus_player | ||||
| 
 | ||||
| import androidx.annotation.NonNull; | ||||
| 
 | ||||
| import io.flutter.embedding.engine.plugins.FlutterPlugin | ||||
| import io.flutter.plugin.common.MethodCall | ||||
| import io.flutter.plugin.common.MethodChannel | ||||
| import io.flutter.plugin.common.MethodChannel.MethodCallHandler | ||||
| import io.flutter.plugin.common.MethodChannel.Result | ||||
| import io.flutter.plugin.common.PluginRegistry.Registrar | ||||
| 
 | ||||
| public class MusicusPlayerPlugin: FlutterPlugin, MethodCallHandler { | ||||
|   private lateinit var channel: MethodChannel | ||||
| 
 | ||||
|   override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { | ||||
|     channel = MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "de.johrpan.musicus_player/platform") | ||||
|     channel.setMethodCallHandler(this); | ||||
|   } | ||||
| 
 | ||||
|   override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { | ||||
|     // TODO: Implement. | ||||
|   } | ||||
| 
 | ||||
|   override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { | ||||
|     channel.setMethodCallHandler(null) | ||||
|   } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Elias Projahn
						Elias Projahn