hugo
hugo copied to clipboard
setEnabled() not available in latest jar.
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:
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.
I am not able to call
hugo { enabled false }
in build.gradle. I get an error:
DSL method not found: 'hugo()'
Please read my previous comment, you'll need to either build Hugo yourself or use Jitpack until a new release is published.
How can we use gradlew to build by ourselves?
If you can't figure out how to build it yourself, use https://jitpack.io/#JakeWharton/hugo/50ee96dc07
@lennykano Thanks. I will use https://jitpack.io/#JakeWharton/hugo/50ee96dc07 directly
Hello, Thanks lennykano for this alternative solution. Looking forward for a new version though :)
I've found that Hugo messes with the debugger in AS so setEnabled would be extremely useful. Also looking forward to a new version.
I have the same problem,Did you solve it??? Hugo.setenabled is not find and DSL method not found: 'hugo()'
@koalahamlet
@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 either you haven't added jitpack to your allprojects
repositories, or 1.2.2-SNAPSHOT
isn't a valid version. Probably both.
@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;
}