فهرست منبع

Refactor to rename package from 'com.github.urho3d' to 'io.urho3d'.

Yao Wei Tjong 姚伟忠 5 سال پیش
والد
کامیت
77fb86d9ba

+ 1 - 1
CMake/Modules/UrhoCommon.cmake

@@ -535,7 +535,7 @@ if (APPLE)
     if (URHO3D_MACOSX_BUNDLE OR (APPLE AND ARM))
         # Only set the bundle properties to its default when they are not explicitly specified by user
         if (NOT MACOSX_BUNDLE_GUI_IDENTIFIER)
-            set (MACOSX_BUNDLE_GUI_IDENTIFIER com.github.urho3d.\${PRODUCT_NAME:rfc1034identifier:lower})
+            set (MACOSX_BUNDLE_GUI_IDENTIFIER io.urho3d.\${PRODUCT_NAME:rfc1034identifier:lower})
         endif ()
         if (NOT MACOSX_BUNDLE_BUNDLE_NAME)
             set (MACOSX_BUNDLE_BUNDLE_NAME \${PRODUCT_NAME})

+ 4 - 4
Docs/Doxyfile.in

@@ -1259,7 +1259,7 @@ DOCSET_FEEDNAME        = "Urho3D Documentation"
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_DOCSET is set to YES.
 
-DOCSET_BUNDLE_ID       = com.github.urho3d.Urho3D.@URHO3D_VERSION@
+DOCSET_BUNDLE_ID       = io.urho3d.Urho3D.@URHO3D_VERSION@
 
 # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
 # the documentation publisher. This should be a reverse domain-name style
@@ -1267,7 +1267,7 @@ DOCSET_BUNDLE_ID       = com.github.urho3d.Urho3D.@URHO3D_VERSION@
 # The default value is: org.doxygen.Publisher.
 # This tag requires that the tag GENERATE_DOCSET is set to YES.
 
-DOCSET_PUBLISHER_ID    = com.github.urho3d.Urho3D
+DOCSET_PUBLISHER_ID    = io.urho3d.Urho3D
 
 # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
 # The default value is: Publisher.
@@ -1358,7 +1358,7 @@ QCH_FILE               =
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
-QHP_NAMESPACE          = com.github.urho3d.Urho3D.@URHO3D_VERSION@
+QHP_NAMESPACE          = io.urho3d.Urho3D.@URHO3D_VERSION@
 
 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
 # Help Project output. For more information please see Qt Help Project / Virtual
@@ -1417,7 +1417,7 @@ GENERATE_ECLIPSEHELP   = @Eclipse_HELP@
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
 
-ECLIPSE_DOC_ID         = com.github.urho3d.Urho3D.@URHO3D_VERSION@
+ECLIPSE_DOC_ID         = io.urho3d.Urho3D.@URHO3D_VERSION@
 
 # If you want full control over the layout of the generated HTML pages it might
 # be necessary to disable the index and replace it with your own. The

+ 1 - 1
Source/ThirdParty/SDL/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -33,7 +33,7 @@ import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ApplicationInfo;
 
-import com.github.urho3d.UrhoActivity;
+import io.urho3d.UrhoActivity;
 
 /**
     SDL Activity

+ 1 - 1
android/launcher-app/build.gradle.kts

@@ -33,7 +33,7 @@ android {
     defaultConfig {
         minSdkVersion(18)
         targetSdkVersion(30)
-        applicationId = "com.github.urho3d.launcher"
+        applicationId = "io.urho3d.launcher"
         versionCode = 1
         versionName = project.version.toString()
         testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"

+ 1 - 1
android/launcher-app/src/main/AndroidManifest.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.github.urho3d.launcher">
+          package="io.urho3d.launcher">
 
     <application
         android:allowBackup="true"

+ 22 - 14
android/launcher-app/src/main/java/com/github/urho3d/launcher/LauncherActivity.kt → android/launcher-app/src/main/java/io/urho3d/launcher/LauncherActivity.kt

@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 //
 
-package com.github.urho3d.launcher
+package io.urho3d.launcher
 
 import android.app.ExpandableListActivity
 import android.content.Intent
@@ -28,7 +28,7 @@ import android.os.Bundle
 import android.view.View
 import android.widget.ExpandableListView
 import android.widget.SimpleExpandableListAdapter
-import com.github.urho3d.UrhoActivity
+import io.urho3d.UrhoActivity
 
 class LauncherActivity : ExpandableListActivity() {
 
@@ -43,15 +43,19 @@ class LauncherActivity : ExpandableListActivity() {
         val libraryNames = UrhoActivity.getLibraryNames(this)
         val items = mutableMapOf("C++" to libraryNames.filterNot { regex.matches(it) }.sorted())
         if (libraryNames.find { it == "Urho3DPlayer" } != null) {
-            items.putAll(mapOf(
+            items.putAll(
+                mapOf(
                     // FIXME: Should not assume both scripting subsystems are enabled in the build
                     "AngelScript" to getScriptNames("Data/Scripts"),
                     "Lua" to getScriptNames("Data/LuaScripts")
-            ))
+                )
+            )
         }
         items.filterValues { it.isEmpty() }.forEach { items.remove(it.key) }
 
-        setListAdapter(SimpleExpandableListAdapter(this,
+        setListAdapter(
+            SimpleExpandableListAdapter(
+                this,
                 items.map {
                     mapOf("api" to it.key, "info" to "Click to expand/collapse")
                 },
@@ -66,15 +70,17 @@ class LauncherActivity : ExpandableListActivity() {
                 R.layout.launcher_list_item,
                 arrayOf("item"),
                 intArrayOf(android.R.id.text1)
-        ))
+            )
+        )
         setContentView(R.layout.activity_launcher)
 
         // Pass the argument to the main activity, if any
         launch(intent.getStringExtra(MainActivity.argument))
     }
 
-    override fun onChildClick(parent: ExpandableListView?, v: View?, groupPos: Int, childPos: Int,
-                              id: Long): Boolean {
+    override fun onChildClick(
+        parent: ExpandableListView?, v: View?, groupPos: Int, childPos: Int, id: Long
+    ): Boolean {
         @Suppress("UNCHECKED_CAST")
         launch((expandableListAdapter.getChild(groupPos, childPos) as Map<String, String>)["item"])
         return true
@@ -82,12 +88,14 @@ class LauncherActivity : ExpandableListActivity() {
 
     private fun launch(argument: String?) {
         if (argument != null) {
-            startActivity(Intent(this, MainActivity::class.java)
-                    .putExtra(MainActivity.argument,
-                            if (argument.contains('.')) {
-                                if (argument.endsWith(".as")) "Urho3DPlayer:Scripts/$argument"
-                                else "Urho3DPlayer:LuaScripts/$argument"
-                            } else argument
+            startActivity(
+                Intent(this, MainActivity::class.java)
+                    .putExtra(
+                        MainActivity.argument,
+                        if (argument.contains('.')) {
+                            if (argument.endsWith(".as")) "Urho3DPlayer:Scripts/$argument"
+                            else "Urho3DPlayer:LuaScripts/$argument"
+                        } else argument
                     )
             )
         }

+ 2 - 2
android/launcher-app/src/main/java/com/github/urho3d/launcher/MainActivity.kt → android/launcher-app/src/main/java/io/urho3d/launcher/MainActivity.kt

@@ -20,9 +20,9 @@
 // THE SOFTWARE.
 //
 
-package com.github.urho3d.launcher
+package io.urho3d.launcher
 
-import com.github.urho3d.UrhoActivity
+import io.urho3d.UrhoActivity
 
 class MainActivity : UrhoActivity() {
 

+ 1 - 1
android/urho3d-lib/src/main/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.github.urho3d">
+          package="io.urho3d">
 
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000"/>

+ 0 - 43
android/urho3d-lib/src/main/java/com/github/urho3d/UrhoActivity.kt

@@ -1,43 +0,0 @@
-//
-// Copyright (c) 2008-2020 the Urho3D project.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-
-package com.github.urho3d
-
-import android.content.Context
-import org.libsdl.app.SDLActivity
-import java.io.File
-
-open class UrhoActivity : SDLActivity() {
-
-    companion object {
-        private val regex = Regex("^lib(.*)\\.so$")
-
-        @JvmStatic
-        fun getLibraryNames(context: Context) = File(context.applicationInfo.nativeLibraryDir)
-                    .listFiles { _, it -> regex.matches(it) }!!
-                    .sortedBy { it.lastModified() }
-                    .map {
-                        regex.find(it.name)?.groupValues?.last() ?: throw IllegalStateException()
-                    }
-    }
-
-}

+ 21 - 0
android/urho3d-lib/src/main/java/io/urho3d/UrhoActivity.kt

@@ -0,0 +1,21 @@
+package io.urho3d
+
+import android.content.Context
+import org.libsdl.app.SDLActivity
+import java.io.File
+
+open class UrhoActivity : SDLActivity() {
+
+    companion object {
+        private val regex = Regex("^lib(.*)\\.so$")
+
+        @JvmStatic
+        fun getLibraryNames(context: Context) = File(context.applicationInfo.nativeLibraryDir)
+            .listFiles { _, it -> regex.matches(it) }!!
+            .sortedBy { it.lastModified() }
+            .map {
+                regex.find(it.name)?.groupValues?.last() ?: throw IllegalStateException()
+            }
+    }
+
+}

+ 1 - 1
build.gradle.kts

@@ -24,7 +24,7 @@ import org.gradle.internal.io.NullOutputStream
 import java.io.ByteArrayOutputStream
 
 allprojects {
-    group = "com.github.urho3d"
+    group = "io.urho3d"
     version = determineVersion()
     description = """
         Urho3D is a free lightweight, cross-platform 2D and 3D game engine implemented in C++ and

+ 1 - 1
buildSrc/src/main/kotlin/UrhoCommon.kt

@@ -33,7 +33,7 @@ const val cmakeVersion = "3.17.3+"
  * Current supported platforms: android.
  */
 @Suppress("unused")
-fun PluginDependenciesSpec.urho3d(platform: String): PluginDependencySpec = id("com.github.urho3d.$platform")
+fun PluginDependenciesSpec.urho3d(platform: String): PluginDependencySpec = id("io.urho3d.$platform")
 
 /**
  * Naive implementation of "touch" command.

+ 1 - 1
buildSrc/src/main/kotlin/com/github/urho3d/gradle/BaseExtension.kt → buildSrc/src/main/kotlin/io/urho3d/gradle/BaseExtension.kt

@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 //
 
-package com.github.urho3d.gradle
+package io.urho3d.gradle
 
 open class BaseExtension {
 

+ 1 - 1
buildSrc/src/main/kotlin/com/github/urho3d/gradle/BasePlugin.kt → buildSrc/src/main/kotlin/io/urho3d/gradle/BasePlugin.kt

@@ -20,7 +20,7 @@
 // THE SOFTWARE.
 //
 
-package com.github.urho3d.gradle
+package io.urho3d.gradle
 
 import org.gradle.api.Plugin
 import org.gradle.api.Project

+ 2 - 2
buildSrc/src/main/kotlin/com/github/urho3d/gradle/android/AndroidPlugin.kt → buildSrc/src/main/kotlin/io/urho3d/gradle/android/AndroidPlugin.kt

@@ -20,9 +20,9 @@
 // THE SOFTWARE.
 //
 
-package com.github.urho3d.gradle.android
+package io.urho3d.gradle.android
 
-import com.github.urho3d.gradle.BasePlugin
+import io.urho3d.gradle.BasePlugin
 import org.gradle.api.Project
 import org.gradle.kotlin.dsl.invoke
 

+ 2 - 2
buildSrc/src/main/kotlin/com/github/urho3d/gradle/android/AndroidPluginExtension.kt → buildSrc/src/main/kotlin/io/urho3d/gradle/android/AndroidPluginExtension.kt

@@ -20,8 +20,8 @@
 // THE SOFTWARE.
 //
 
-package com.github.urho3d.gradle.android
+package io.urho3d.gradle.android
 
-import com.github.urho3d.gradle.BaseExtension
+import io.urho3d.gradle.BaseExtension
 
 open class AndroidPluginExtension : BaseExtension()

+ 0 - 1
buildSrc/src/main/resources/META-INF/gradle-plugins/com.github.urho3d.android.properties

@@ -1 +0,0 @@
-implementation-class=com.github.urho3d.gradle.android.AndroidPlugin

+ 1 - 0
buildSrc/src/main/resources/META-INF/gradle-plugins/io.urho3d.android.properties

@@ -0,0 +1 @@
+implementation-class=io.urho3d.gradle.android.AndroidPlugin