Răsfoiți Sursa

Enable documentation step for Android platform.

Yao Wei Tjong 姚伟忠 5 ani în urmă
părinte
comite
0a6df5627f

+ 1 - 1
.github/workflows/main.yml

@@ -100,7 +100,7 @@ jobs:
         if: startsWith(matrix.platform, 'linux') || matrix.platform == 'android'
       - name: Documentation
         run: script/dockerized.sh ${PLATFORM/-*} rake ci doc
-        if: matrix.platform != 'android' && matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
+        if: matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
       - name: Package
         run: script/dockerized.sh ${PLATFORM/-*} rake ci package
         if: matrix.platform != 'android' && matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'

+ 4 - 1
Rakefile

@@ -91,7 +91,10 @@ end
 
 desc 'Generate documentation'
 task :doc do
-  next if ENV['PLATFORM'] == 'android'
+  if ENV['PLATFORM'] == 'android'
+    Rake::Task['gradle'].invoke('documentationZip')
+    next
+  end
   system %Q{cmake --build "#{build_tree}" #{build_config} --target doc} or abort
 end
 

+ 0 - 6
android/launcher-app/build.gradle.kts

@@ -20,8 +20,6 @@
 // THE SOFTWARE.
 //
 
-import java.time.Duration
-
 plugins {
     id("com.android.application")
     kotlin("android")
@@ -114,10 +112,6 @@ afterEvaluate {
         tasks {
             "externalNativeBuild$config" {
                 mustRunAfter(":android:urho3d-lib:externalNativeBuild$config")
-                if (System.getenv("CI") != null) {
-                    @Suppress("UnstableApiUsage")
-                    timeout.set(Duration.ofMinutes(15))
-                }
             }
         }
     }

+ 4 - 19
android/urho3d-lib/build.gradle.kts

@@ -22,7 +22,6 @@
 
 import org.gradle.internal.io.NullOutputStream
 import org.gradle.internal.os.OperatingSystem
-import java.time.Duration
 
 plugins {
     id("com.android.library")
@@ -108,8 +107,6 @@ dependencies {
     androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
 }
 
-lateinit var docABI: String
-
 afterEvaluate {
     // Part of the our external native build tree resided in Gradle buildDir
     // When the buildDir is cleaned then we need a way to re-configure that part back
@@ -142,18 +139,9 @@ afterEvaluate {
                                 into("tree/$config/$abi/$it")
                             }
                         }
-                        if (config == "Release") {
-                            docABI = abi
-                        }
                     }
                 }
             }
-            if (System.getenv("CI") != null) {
-                "externalNativeBuild$config" {
-                    @Suppress("UnstableApiUsage")
-                    timeout.set(Duration.ofMinutes(25))
-                }
-            }
         }
     }
 }
@@ -169,7 +157,7 @@ tasks {
         standardOutput = NullOutputStream.INSTANCE
         args("--build", ".", "--target", "doc")
         dependsOn("makeDocConfigurer")
-        mustRunAfter("zipBuildTreeRelease")
+        mustRunAfter("zipBuildTreeDebug")
     }
     register<Zip>("documentationZip") {
         archiveClassifier.set("documentation")
@@ -177,7 +165,8 @@ tasks {
     }
     register<Task>("makeDocConfigurer") {
         doLast {
-            val buildTree = File(android.externalNativeBuild.cmake.buildStagingDirectory, "cmake/release/$docABI")
+            val docABI = File(buildDir, "tree/Debug").list()?.first()
+            val buildTree = File(android.externalNativeBuild.cmake.buildStagingDirectory, "cmake/debug/$docABI")
             named<Exec>("makeDoc") {
                 // This is a hack - expect the first line to contain the path to the CMake executable
                 executable = File(buildTree, "build_command.txt").readLines().first().split(":").last().trim()
@@ -209,23 +198,19 @@ publishing {
             artifact(tasks["sourcesJar"])
             artifact(tasks["documentationZip"])
             pom {
-                @Suppress("UnstableApiUsage")
                 inceptionYear.set("2008")
-                @Suppress("UnstableApiUsage")
                 licenses {
                     license {
                         name.set("MIT License")
                         url.set("https://github.com/urho3d/Urho3D/blob/master/LICENSE")
                     }
                 }
-                @Suppress("UnstableApiUsage")
                 developers {
                     developer {
                         name.set("Urho3D contributors")
                         url.set("https://github.com/urho3d/Urho3D/graphs/contributors")
                     }
                 }
-                @Suppress("UnstableApiUsage")
                 scm {
                     url.set("https://github.com/urho3d/Urho3D.git")
                     connection.set("scm:git:ssh://[email protected]:urho3d/Urho3D.git")
@@ -263,7 +248,7 @@ bintray {
         desc = project.description
         version.apply {
             name = project.version.toString()
-            desc = "Continuous delivery from Travis-CI."
+            desc = "Continuous delivery from GitHub Actions."
         }
     }
 }