NeoGradle - covers1624/DevLogin GitHub Wiki

DevLogin is integrated into NeoGradle starting from version 7.0.139+.

For more details, refer to their documentation.

For NeoGradle 7.0.138 (or older)

Step 1: Add maven repository:

groovy (build.gradle)
repositories {
    maven { url 'https://maven.covers1624.net/' }
}
kotlin (build.gradle.kts)
repositories {
    maven("https://maven.covers1624.net/")
}

Step 2: Add runtime dependency:

groovy (build.gradle)
dependencies {
    runtimeOnly 'net.covers1624:DevLogin:0.1.0.5'
}
kotlin (build.gradle.kts)
dependencies {
    runtimeOnly("net.covers1624:DevLogin:0.1.0.5")
}

Step 3: Add run configuration:

groovy (build.gradle)
minecraft {
    runs {
        clientAuth {
            parent runs.client
            main 'net.covers1624.devlogin.DevLogin'
            
            // Apply only 1 of the following
            // Pull launch target from existing 'client' run config 'main'
            // this is the recommended method of setting 'launch_target'
            args '--launch_target', '{LAUNCH_TARGET}'
            lazyToken('LAUNCH_TARGET', { runs.client.main })

            // Manually set launch target | fallback method for if the above does not work
            args '--launch_target', 'cpw.mods.bootstraplauncher.BootstrapLauncher'
        }
    }
}
kotlin (build.gradle.kts)
minecraft {
    runs {
        clientAuth {
            parent(runs.client)
            main = "net.covers1624.devlogin.DevLogin"
            
            // Apply only 1 of the following
            // Pull launch target from existing 'client' run config 'main'
            // this is the recommended method of setting 'launch_target'
            args.addAll("--launch_target", "{LAUNCH_TARGET}")
            lazyToken("LAUNCH_TARGET", { runs.client.main })

            // Manually set launch target | fallback method for if the above does not work
            args.addAll("--launch_target", "cpw.mods.bootstraplauncher.BootstrapLauncher")
        }
    }
}
⚠️ **GitHub.com Fallback** ⚠️