hugo icon indicating copy to clipboard operation
hugo copied to clipboard

setEnabled() not available in latest jar.

Open koalahamlet opened this issue 8 years ago • 13 comments

This is technically a dupe of #127 but I'll avoid the nondescript title and inflammatory exclamation points. I've pulled the latest hugo plugin, and wanted to access that handy little public static method setEnabled(). Unfortunately it doesn't seem to be in the decompiled class. Would be nice to have out in the wild :bear:

koalahamlet avatar Mar 23 '16 22:03 koalahamlet

The last release (1.2.1) was in February last year, whereas that commit (https://github.com/JakeWharton/hugo/commit/00a0d4f580f8c82b943c627b1f67de069f0f8897) was done in August. I'm sure Jake will release a new version when he feels the need, otherwise just fork it or use JitPack for now.

kaneoriley avatar Apr 29 '16 05:04 kaneoriley

I am not able to call hugo { enabled false } in build.gradle. I get an error:

DSL method not found: 'hugo()'

IgorGanapolsky avatar May 03 '16 21:05 IgorGanapolsky

Please read my previous comment, you'll need to either build Hugo yourself or use Jitpack until a new release is published.

kaneoriley avatar May 03 '16 21:05 kaneoriley

How can we use gradlew to build by ourselves?

tzutalin avatar May 05 '16 02:05 tzutalin

If you can't figure out how to build it yourself, use https://jitpack.io/#JakeWharton/hugo/50ee96dc07

kaneoriley avatar May 05 '16 08:05 kaneoriley

@lennykano Thanks. I will use https://jitpack.io/#JakeWharton/hugo/50ee96dc07 directly

tzutalin avatar May 05 '16 09:05 tzutalin

Hello, Thanks lennykano for this alternative solution. Looking forward for a new version though :)

ClemMahe avatar Jan 24 '17 13:01 ClemMahe

I've found that Hugo messes with the debugger in AS so setEnabled would be extremely useful. Also looking forward to a new version.

damianflannery avatar Feb 01 '17 14:02 damianflannery

I have the same problem,Did you solve it??? Hugo.setenabled is not find and DSL method not found: 'hugo()'

756718646 avatar Feb 14 '17 02:02 756718646

@koalahamlet

756718646 avatar Feb 14 '17 02:02 756718646

@lennykano Could you help me following up on your advise to use the Jitpack version?

The following

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }

    dependencies {
        classpath 'com.github.JakeWharton.hugo:hugo-plugin:50ee96dc07'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.hugo'

results in

Error:Failed to resolve: com.jakewharton.hugo:hugo-annotations:1.2.2-SNAPSHOT
Error:Failed to resolve: com.jakewharton.hugo:hugo-runtime:1.2.2-SNAPSHOT

mtotschnig avatar Jun 02 '17 14:06 mtotschnig

@mtotschnig either you haven't added jitpack to your allprojects repositories, or 1.2.2-SNAPSHOT isn't a valid version. Probably both.

kaneoriley avatar Jun 05 '17 02:06 kaneoriley

@lennykano I was misled by you. This library is only effective in the debug version. Why do you design a temporary enable, if you want to disable, you can assemble a release or other build version.

master version : https://github.com/JakeWharton/hugo/blob/master/hugo-plugin/src/main/groovy/hugo/weaving/plugin/HugoPlugin.groovy

1.2.1 : hugo-1.2.1\hugo-plugin\src\main\groovy\hugo\weaving\plugin\HugoPlugin.groovy

    project.dependencies {
      debugCompile 'com.jakewharton.hugo:hugo-runtime:1.2.1'
      // TODO this should come transitively
      debugCompile 'org.aspectj:aspectjrt:1.8.5'
      compile 'com.jakewharton.hugo:hugo-annotations:1.2.1'
    }

    variants.all { variant ->
      if (!variant.buildType.isDebuggable()) {
        log.debug("Skipping non-debuggable build type '${variant.buildType.name}'.")
        return;
      }

liaolintao avatar Jan 10 '20 04:01 liaolintao