This message was deleted.
# android
s
This message was deleted.
c
Here's the root build.gradle.kts of the problematic project
Copy code
buildscript {
  repositories {
    gradlePluginPortal()
    google()
    mavenCentral()
  }

  dependencies {
    classpath("com.android.tools.build:gradle:7.4.0-alpha07")
    classpath(kotlin("gradle-plugin", version = "1.7.0"))
    classpath("com.google.dagger:hilt-android-gradle-plugin:2.42")
    classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.1")
  }
}

plugins {
  id("org.jetbrains.kotlin.jvm") version "1.7.0" apply false
  id("com.github.ben-manes.versions") version "0.42.0"
}

allprojects {
  repositories {
    google()
    mavenCentral()
  }
}
working project 1
Copy code
buildscript {
  repositories {
    google()
    gradlePluginPortal()
    mavenCentral()
  }

  dependencies {
    classpath(kotlin("gradle-plugin", version = "1.7.0"))
    classpath("com.android.tools.build:gradle:7.4.0-alpha07")
    classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.1")
    classpath("com.google.dagger:hilt-android-gradle-plugin:2.42")
    classpath("com.google.firebase:perf-plugin:1.4.1")
  }
}

plugins {
  id("com.github.ben-manes.versions") version "0.42.0"
}

allprojects {
  repositories {
    google()
    mavenCentral()
  }
}
working project 2
Copy code
buildscript {
  repositories {
    gradlePluginPortal()
    google()
    mavenCentral()
  }

  dependencies {
    classpath("com.android.tools.build:gradle:7.4.0-alpha07")
    classpath(kotlin("gradle-plugin", version = "1.7.0"))
    classpath("com.google.dagger:hilt-android-gradle-plugin:2.42")
    classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.1")
  }
}

plugins {
  id("com.github.ben-manes.versions") version "0.42.0"
}

allprojects {
  repositories {
    google()
    mavenCentral()
  }
}
Can anyone spot any issues? Starting to tear my hair out on what I don't get proper syntax/error highlighting in my one project when trying to write lint rules.
e
if it compiles then this is an IDE issue. tried the usual invalidate&restart?
c
Yep. Tried like 50 different combinations of repairing IDE and invalidate and restart
m
Maybe try changing the JDK ?
(in module settings -> project)
c
Tried that too. Here's the "broken" project.
m
the jdk in "project structure", not "gradle settings"
c
I dont think jdk in project structure exists?
m
This one
c
maybe thats intellij only?
m
Ah, maybe
Open the project in intelliJ ? 😅
c
lol. i wish. every time i try it says that intellij doesn't support this version of AGP.
m
Ahah yea that's a pain 😅
c
ugh. such is android dev life i suppose. i just wish i could get some additional information on why the IDE has an issue with it even though it ocmpiles fine. /shruggie. i give up. i just wont write lint rules in this project i suppose. lol
1
e
android studio
👀 1
c
I'll move over to the embedded JDK. Although all of my projects typically just use my system jdk (11).
I really wish the JDK selection dropdown was a little more understandable. 3 out of those 4 options are identical... no?
e
you should use the same JDK as your command-line builds, otherwise you'll spin up two separate gradle daemons
c
Yeah. I tried to change it to the embedded and gradle doctor gave me an error. guess its time to revert that change. lol
disabled gradle doctor. set the jdk to embedded jdk. still red lines after restart/invalidate caches. oh well. not worth my time anymore. thanks @ephemient and @Martin ❤️
❤️ 1
d
If you’re trying to write custom lint, treat it as it’s own module in your project Then in the projects you want to use it in, use lintChecks and lintPublish as needed - https://developer.android.com/studio/build/dependencies#dependency_configurations In this scenario, it will not appear in your settings.gradle to say it is part of your project, but will get picked up by lintPublish to be a module you can use.
c
Thanks. I have custom lints working in 3 of my projects. It's just that in this one project I get red lines in the IDE even though the setup is seemingly identical to the other two.
LMAO! I fixed it! I just deleted the .idea directory. closed project and reopened, and then reverted the changes to the .idea files that i commit to my repo. YAYYYY
🙌 1
m
victory