syslogic / agconnect-publishing-gradle-plugin

Huawei AppGallery Connect Publishing Gradle Plugin
MIT License
6 stars 0 forks source link

Cant use plugin because of missing tasks #2

Open yoshikakbudto opened 1 week ago

yoshikakbudto commented 1 week ago

I already have the built apk file. Just need to upload it to Huawei. But for now no luck...

Having this build.gradle content:

buildscript {
    repositories {
        maven { url 'https://developer.huawei.com/repo/' }
        maven { url 'https://jitpack.io' }
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.6.0'
        classpath 'com.huawei.agconnect:agcp:1.9.1.303'
        classpath 'io.syslogic:agconnect-publishing-gradle-plugin:1.3.6'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'io.syslogic.agconnect.publishing'

android {
        namespace = "org.myorg.android.name" // should match with the one in AndroidManifest.xml
    compileSdkVersion 33
        defaultConfig {
        applicationId "com.myproject.huawei"
        minSdkVersion 21
        targetSdkVersion 33
    }
        sourceSets {
          main {
            manifest.srcFile 'src/main/AndroidManifest.xml' 
          }
        }
}

/** Huawei AppGallery Connect: agc-apiclient.json */
def json_agc = "/Users/builduser/huawei_deploy_gradle/huawei-appgallery.json"
if (rootProject.file(json_agc).exists()) {
    agcPublishing {
        configFile = rootProject.file(json_agc).absolutePath
        releaseType = 1
        verbose = false
        logHttp = true
    }
}

Then listing available tasks with gradle tasks command gives only one task under the 'Agconnect tasks' block:

> Task :tasks

------------------------------------------------------------
Tasks runnable from root project 'huawei_deploy_gradle'
------------------------------------------------------------

Agconnect tasks
---------------
welp

Android tasks
-------------

Then how can i upload the APK ?